]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: do not report unknown guests in print_guests_shutdown
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 19 Apr 2018 06:41:03 +0000 (08:41 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Apr 2018 08:46:41 +0000 (10:46 +0200)
commitcce57265c42e630036ed4d292d6399cdee08fd78
tree668009de78aaa5b2e65891e6ed1bd90cfaef3e82
parent08bb5eeba7925a5a9cbd5a8dc9368ca3d36d3d3f
tools: do not report unknown guests in print_guests_shutdown

If another event in background while running libvirt-guests.sh
completely undefines a guest it will no more be available for proper
reporting of its shutdown.

This appears in the log as:
  Failed to determint state of guest: <UUID>. Not tracking it anymore
  Shutdown of guest  complete

The first message already reports that we are giving up on the guest
(per UUID which is all we have left at that point). To avoid the message
with an empty guest_name in such a case lets check what guest_name
returned and only print a report on valid content.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Dariusz Gadomski <dariusz.gadomski@canonical.com>
tools/libvirt-guests.sh.in