[virt-tools-list] [virt-manager PATCH] manager: show reason together with domain state

Cole Robinson crobinso at redhat.com
Tue Jan 12 18:05:14 UTC 2016


On 01/12/2016 03:50 AM, Pavel Hrdina wrote:
> We display this information in the detail page, so let's display it also
> in the manager page.
> 
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
>  virtManager/manager.py | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/virtManager/manager.py b/virtManager/manager.py
> index 3b908ee..3a14a2b 100644
> --- a/virtManager/manager.py
> +++ b/virtManager/manager.py
> @@ -645,6 +645,9 @@ class vmmManager(vmmGObjectUI):
>          else:
>              name = vm.get_name_or_title()
>              status = vm.run_status()
> +            reason = vm.run_status_reason()
> +            if reason:
> +                status = "%s (%s)" % (status, reason)
>              markup = self._build_vm_markup(name, status)
>              status_icon = vm.run_status_icon_name()
>              hint = vm.get_description()
> @@ -747,6 +750,9 @@ class vmmManager(vmmGObjectUI):
>  
>              name = vm.get_name_or_title()
>              status = vm.run_status()
> +            reason = vm.run_status_reason()
> +            if reason:
> +                status = "%s (%s)" % (status, reason)
>  
>              row[ROW_SORT_KEY] = name
>              row[ROW_STATUS_ICON] = vm.run_status_icon_name()
> 

Hmm. I'm kinda hesitant here because many of reasons (or their labels) are
confusing:

Confusing:
  Paused (User)
  Shutdown (Destroyed)

Now, you and I understand what those all mean, but I guarantee some users will
ask questions. And then there's all the uninteresting states like:

  Running (Unpaused)
  Saves (Saved)
  Running (Restored)

That said I understand some state reasons are very useful, like pausing on IO
error, or any reason the VM crashed. So I think we should whitelist the states
we show in manager window to only be those of particular relevance, like
uncommon events. The details window can continue to show everything

Thanks,
Cole




More information about the virt-tools-list mailing list