提交 cce57265 编写于 作者: C Christian Ehrhardt 提交者: Michal Privoznik

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: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDariusz Gadomski <dariusz.gadomski@canonical.com>
上级 08bb5eeb
......@@ -363,8 +363,10 @@ print_guests_shutdown()
esac
name=$(guest_name "$uri" "$guest")
eval_gettext "Shutdown of guest \$name complete."
echo
if [ -n "$name" ]; then
eval_gettext "Shutdown of guest \$name complete."
echo
fi
done
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册