From nobody Fri Dec 19 19:02:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1742486703; cv=none; d=zohomail.com; s=zohoarc; b=TCSlf/l/m+LbSAR0VuI6UhaA+bdA7VAFcDlqvITv7tyGg+yrBY6UODD/Tp5e22u63aMIc74yOlEhhBk60k+SCj4FPe53IU3OpuHhPhr+Ev/vaqwae+LJSdkOCwxNy3kxEb8j5IHucuK3PO8nFVwyscAnZODkUXIxH2iKhEWUefw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1742486703; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=WyLSXRLLhIMThLfejkol6zRvzoGL0aMVGuAK0reOzBo=; b=K+RyhIChoHHzqriAnZUvj9KABzJxTeLbIpyENd1yaU6YY/j8+Sxo8sxLRVr3IAaHAXytE4zIp4kQMw5/eX4H3f+g+ncTzRHfCMDf7XlkfetHAr9AxbqZTS4Zspi45lVAyGZArjXf+0y490efEf1uvue9syyKPK5Ws1Jv1urqaao= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174248670356173.86956018951798; Thu, 20 Mar 2025 09:05:03 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EBBFB1738; Thu, 20 Mar 2025 12:05:02 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 35CBA15A5; Thu, 20 Mar 2025 12:04:26 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id E29E71278; Thu, 20 Mar 2025 12:04:12 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 30C6B1241 for ; Thu, 20 Mar 2025 12:04:12 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-357-4ULA_TC5Mmu60IQ1NmDk8A-1; Thu, 20 Mar 2025 12:04:10 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D2735180882E for ; Thu, 20 Mar 2025 16:04:09 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.6]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 073D719373C4 for ; Thu, 20 Mar 2025 16:04:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1742486651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h3TGI/1y8uUOYXxfKFu6KlGDQDmbzdatvdO93RNNYhE=; b=de4SGdrS6YP5ePymiPDS5eBb1+HwuUaXiAZXGZx6W1yyUOnBMmXPakOVv8A3c2nS21R9ax DN8G6Xuwef2iejncYbPdEGSxrXJ5seJ/cNyIA2I3iZh/dOrFY5nIxs+OvO6s5QvSHg5Z4x Ughzw8TtGkii9VCnkWKKoZCZhfaJh2A= X-MC-Unique: 4ULA_TC5Mmu60IQ1NmDk8A-1 X-Mimecast-MFC-AGG-ID: 4ULA_TC5Mmu60IQ1NmDk8A_1742486649 To: devel@lists.libvirt.org Subject: [PATCH 1/8] lib: error: Introduce 'VIR_ERR_AGENT_COMMAND_TIMEOUT' Date: Thu, 20 Mar 2025 17:03:58 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vxEULJwortAc8A3Vxh7tDaWdyId8EjLJIQi-YhyLz4s_1742486649 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 57CZ7QBWPSLBI6LPYE5CZA4YKEFOHSIJ X-Message-ID-Hash: 57CZ7QBWPSLBI6LPYE5CZA4YKEFOHSIJ X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1742486704585019000 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Introduce a new special error code for guest agent commands. The error code will be specifically reported only when an actual command (not a sync) was issued to the guest agent and the timeout time was reached. This will allow users and management applications to differentiate between the cases when the sync timed out and thus there's no risk in the agent actually having executed the command and when the actual command was sent. Signed-off-by: Peter Krempa --- include/libvirt/virterror.h | 2 ++ src/util/virerror.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h index 224eddc9e4..7a2cc2b4bd 100644 --- a/include/libvirt/virterror.h +++ b/include/libvirt/virterror.h @@ -349,6 +349,8 @@ typedef enum { VIR_ERR_CHECKPOINT_INCONSISTENT =3D 109, /* checkpoint can't be used (= Since: 6.10.0) */ VIR_ERR_MULTIPLE_DOMAINS =3D 110, /* more than one matching domain= found (Since: 7.1.0) */ VIR_ERR_NO_NETWORK_METADATA =3D 111, /* Network metadata is not prese= nt (Since: 9.7.0) */ + VIR_ERR_AGENT_COMMAND_TIMEOUT =3D 112,/* guest agent didn't respond to= a non-sync + command within timeout (Since: = 11.2.0) */ # ifdef VIR_ENUM_SENTINELS VIR_ERR_NUMBER_LAST /* (Since: 5.0.0) */ diff --git a/src/util/virerror.c b/src/util/virerror.c index 227a182417..f89bfbc530 100644 --- a/src/util/virerror.c +++ b/src/util/virerror.c @@ -1290,6 +1290,9 @@ static const virErrorMsgTuple virErrorMsgStrings[] = =3D { [VIR_ERR_NO_NETWORK_METADATA] =3D { N_("metadata not found"), N_("metadata not found: %1$s") }, + [VIR_ERR_AGENT_COMMAND_TIMEOUT] =3D { + N_("guest agent command timed out"), + N_("guest agent command timed out: %1$s") }, }; G_STATIC_ASSERT(G_N_ELEMENTS(virErrorMsgStrings) =3D=3D VIR_ERR_NUMBER_LAS= T); --=20 2.48.1