After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696242 - Allow rebooting saved VMs
Allow rebooting saved VMs
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 696239
Blocks:
 
 
Reported: 2013-03-21 01:09 UTC by Zeeshan Ali
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libvirt-machine-props: Micro refactor (2.27 KB, patch)
2013-03-21 01:09 UTC, Zeeshan Ali
committed Details | Review
libvirt-machine-props: Some more refactoring (5.67 KB, patch)
2013-03-21 01:09 UTC, Zeeshan Ali
committed Details | Review
libvirt-machine-props: Allow rebooting saved VMs (2.30 KB, patch)
2013-03-21 01:09 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-03-21 01:09:00 UTC
See comment#3.
Comment 1 Zeeshan Ali 2013-03-21 01:09:02 UTC
Created attachment 239427 [details] [review]
libvirt-machine-props: Micro refactor

Instead of checking for machine being ON each time before calling
notify_reboot_required(), better do this check in the function itself.
Comment 2 Zeeshan Ali 2013-03-21 01:09:06 UTC
Created attachment 239428 [details] [review]
libvirt-machine-props: Some more refactoring

Put 'reboot' into a separate method. lambdas inside lambdas weren't make
it easy to read this code.
Comment 3 Zeeshan Ali 2013-03-21 01:09:11 UTC
Created attachment 239429 [details] [review]
libvirt-machine-props: Allow rebooting saved VMs

Currently, if user changes the properties of a saved VM that require
reboot to take effect, we don't offer user the option to reboot. As a
result the properties are not in effect when user restores the VM, which
is contrary to what she/he will expect.

This patch:

* offers user the option to reboot saved VMs.
* if user chooses to reboot, the VM is first restored and then rebooted.
Comment 4 Zeeshan Ali 2013-03-21 01:10:17 UTC
These patches are based on fix in bug#696239.
Comment 5 Christophe Fergeau 2013-03-21 09:24:31 UTC
Review of attachment 239429 [details] [review]:

Haven't looked closely at the patches, but couldn't find the answer while looking at that patch.
Is the timeout to switch from 'reboot' to 'force reboot' disabled when rebooting saved vms? I've been able to hit the 'force reboot' dialog when boxes tried to reboot an already running box, so I guess it will trigger every time when restarting a saved vm if it's not disabled.
Comment 6 Zeeshan Ali 2013-03-21 12:54:34 UTC
Review of attachment 239429 [details] [review]:

No its not disabled. If machine is in saved state, we simply start/resume it, hook-up to async start completing and return. When starting is done, 'reboot' is called for doing exactly what it did before this patch.
Comment 7 Christophe Fergeau 2013-03-21 13:42:25 UTC
Review of attachment 239429 [details] [review]:

Ah ok, sounds good to me, I was worried we would do
start force-reboot timeout
restore vm
reboot

rather than

restore vm
start force-reboot timeout
reboot

sounds good to me
Comment 8 Christophe Fergeau 2013-03-21 13:42:57 UTC
Review of attachment 239427 [details] [review]:

Failed to publish review: Undefined subroutine &extensions::splinter::lib::WSSplinter::ThrowCodeError called at /var/www/bugzilla.gnome.org/extensions/splinter/lib/WSSplinter.pm line 88.
Comment 9 Zeeshan Ali 2013-03-27 19:29:57 UTC
What about rest of the patches?
Comment 10 Christophe Fergeau 2013-03-28 16:47:35 UTC
Review of attachment 239428 [details] [review]:

Diff's hard to read, but seems ok.
Comment 11 Christophe Fergeau 2013-03-28 16:48:57 UTC
Review of attachment 239429 [details] [review]:

Failed to publish review: Undefined subroutine &extensions::splinter::lib::WSSplinter::ThrowCodeError called at /var/www/bugzilla.gnome.org/extensions/splinter/lib/WSSplinter.pm line 88.