[PATCH] libvirt-guests: make async stop work with transient guest domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=
     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
 
         name=$(guest_name "$uri" "$guest")
+        [ -n "$name" ] || name="$guest"
         eval_gettext "Shutdown of guest \$name complete."
         echo
     done
-- 
2.15.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux