From nobody Mon May 6 17:51:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1516029222921965.7201656819847; Mon, 15 Jan 2018 07:13:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BEA784D2F9; Mon, 15 Jan 2018 15:13:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B1C6A6049C; Mon, 15 Jan 2018 15:13:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8893C62CEC; Mon, 15 Jan 2018 15:13:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0FETERa019925 for ; Mon, 15 Jan 2018 09:29:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4B82260C94; Mon, 15 Jan 2018 14:29:14 +0000 (UTC) Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 39005609A3 for ; Mon, 15 Jan 2018 14:29:11 +0000 (UTC) Received: from bart.luffy.cx (bart.luffy.cx [78.47.78.131]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3211629C2 for ; Mon, 15 Jan 2018 14:29:02 +0000 (UTC) Received: from bart.luffy.cx (localhost [127.0.0.1]) by bart.luffy.cx (Postfix) with ESMTP id 2AF29153A1; Mon, 15 Jan 2018 15:29:00 +0100 (CET) Received: from neo.luffy.cx (184.66.60.188.dynamic.wline.res.cust.swisscom.ch [188.60.66.184]) by bart.luffy.cx (Postfix) with ESMTPS id 04FAD142DD; Mon, 15 Jan 2018 15:29:00 +0100 (CET) Received: by neo.luffy.cx (Postfix, from userid 500) id 8E6D019F6; Mon, 15 Jan 2018 15:28:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bernat.im; h=from:to:cc :subject:date:message-id; s=postfix; bh=2EpclziIWa7OuB6yPgbd4sFQ Yi0=; b=aPbWlKVAki6YGQQ6B13TCf/Ta3V5qVBJQ10q2aDV/kL7m+A/uG+VOXiy 1xPx93W102goxuoE/LkSujPAQtdHo3JbLuShEV7hUwqxIWV0k8KAoANqwAWbsMJz 16BOL99oGvWERnnG7A6vuGrvVyjRUU1NjXhBy0NipJuBc0f2w+Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bernat.im; h=from:to:cc :subject:date:message-id; q=dns; s=postfix; b=Ydp/O1NR6EWKCQ9QS5 fk8faKzqZGiCypkABLVhUaQ4ySvcoQBXwJIKUtihFVXUKV97edPYC1MrDKlWJT30 vlkJWdAtiazFsJ7uuLcn/oqSfqcQz50MoizHT+wddEfunQP5Pqj/ABuTOGR8dn89 gEtJ2L25Obb62pV8sVF+A1q7s= From: Vincent Bernat To: libvir-list@redhat.com Date: Mon, 15 Jan 2018 15:28:56 +0100 Message-Id: <20180115142856.27180-1-vincent@bernat.im> X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 15 Jan 2018 14:29:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 15 Jan 2018 14:29:10 +0000 (UTC) for IP:'78.47.78.131' DOMAIN:'bart.luffy.cx' HELO:'bart.luffy.cx' FROM:'bernat@luffy.cx' RCPT:'' X-RedHat-Spam-Score: 0.139 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS, T_RP_MATCHES_RCVD) 78.47.78.131 bart.luffy.cx 78.47.78.131 bart.luffy.cx X-Scanned-By: MIMEDefang 2.78 on 10.5.110.25 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Mon, 15 Jan 2018 10:13:02 -0500 Cc: Vincent Bernat Subject: [libvirt] [PATCH] libvirt-guests: make async stop work with transient guest domains X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 15 Jan 2018 15:13:31 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" After being stopped, a transient guest domain doesn't appear in the list of guests anymore. Therefore, we can't get its state anymore. The branch handling this case displays an error message on stdout. This error message confuses the script which expects to get a list of "still up" guests. We just remove the message. Also, since we can't get a name, display the UUID of the stopped domain. --- tools/libvirt-guests.sh.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in index 8a158cca434d..e272325f7d5d 100644 --- a/tools/libvirt-guests.sh.in +++ b/tools/libvirt-guests.sh.in @@ -337,8 +337,6 @@ check_guests_shutdown() guests_up=3D for guest in $guests; do if ! guest_is_on "$uri" "$guest" >/dev/null 2>&1; then - eval_gettext "Failed to determine state of guest: \$guest. Not= tracking it anymore." - echo continue fi if "$guest_running"; then @@ -363,6 +361,7 @@ print_guests_shutdown() esac =20 name=3D$(guest_name "$uri" "$guest") + [ -n "$name" ] || name=3D"$guest" eval_gettext "Shutdown of guest \$name complete." echo done --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list