Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display an icon indicating the VM is in some transient state #520

Closed
marmarek opened this issue Mar 8, 2015 · 6 comments
Closed

Display an icon indicating the VM is in some transient state #520

marmarek opened this issue Mar 8, 2015 · 6 comments
Assignees
Labels
C: manager/widget P: major Priority: major. Between "default" and "critical" in severity. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Milestone

Comments

@marmarek
Copy link
Member

marmarek commented Mar 8, 2015

Reported by joanna on 14 Apr 2012 12:30 UTC
Currently we either display a Green dot, indicating the VM is running, or not, implicitly indicting the VM is stopped. However, the VM might be in other states between Running and Halted, such as e.g. "Halting". It is important to indicate this to the user (e.g. by displaying a yellow icon), as otherwise the user things the VM is shutdown and might be trying to e.g. start it again, which however will fail, as the VM is still in some other state, not ready for another start. This is confusing.

Perhaps this could be done by adding an is_in_transient_state() method to QubesVm class, and for all domains where this is true, to display a yellow icon.

Migrated-From: https://wiki.qubes-os.org/ticket/520

@marmarek marmarek added this to the Release 1 milestone Mar 8, 2015
@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. C: manager/widget P: major Priority: major. Between "default" and "critical" in severity. labels Mar 8, 2015
@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Comment by marmarek on 18 Apr 2012 09:15 UTC
vm.get_power_state() already returns states like "Halting", "Dying" (or even "Crashed") in appropriate situations.
vm.is_running is implemented as 'get_power_state() == "Running"' - perhaps it should include also "Halting"?

@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Comment by joanna on 18 Apr 2012 21:05 UTC
No, because we want to display either a nice green icon, indicating that the VM is running and is fully usable vs. when the VM is either starting up or shutting down, and is not really "available" in a way the green icon would suggest. So the cycle, from the user point of view should look like this:

  1. VM is not running (no icon displayed, VM not included in the active list)
  2. VM is starting up (yellow icon is displayed, VM is included in the active list)
  3. VM started fine, is available or usable (green icon)
  4. VM is shutting down (yellow icon, VM still on the active list)
  5. VM halted, not included in xl list (no icon, not on active list) -- this is the same as Installer #1

One things to consider:

Perhaps the green icon (#3 above) should appear only after qrexec connected fine, and before that happens we should still be showing a yellow icon, even though the VM is in state Running already. I think we should go this way, unless it was somehow difficult to implement.

@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Comment by marmarek on 18 Apr 2012 22:10 UTC
Will try to implement somehow "Starting" state (detection of qrexec and/or guid state), but this will not work in every case (some VMs can have not qrexec or guid, but still be usable).
Also this is difficult to differentiate lack of guid reason - starting or halting...
Anyway Aga - you can assume that there is also "Starting" state.

@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Comment by aga on 19 Apr 2012 13:05 UTC
I was also thinking about is_starting() state in manager. There's a well-separated piece of code responsible for starting a vm and the manager knows exactly when the starting begins and when it ends (and shows tray baloons connected with that).

But the super-weak point of this is that it would only work with starting vms from manager, not with qvm-start.

However - if the solution offered by Marek doesn't always work - it may be a way of making it slightly better...

@marmarek
Copy link
Member Author

marmarek commented Mar 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: manager/widget P: major Priority: major. Between "default" and "critical" in severity. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

2 participants