[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu: work around dash 0.5.5 bug in managed save



On 10/25/2010 06:28 PM, Justin Clift wrote:
On 10/23/2010 10:29 AM, Eric Blake wrote:
* configure.ac (VIR_WRAPPER_SHELL): Define to a replacement shell,
if /bin/sh is broken on<>  redirection.
* src/qemu/qemu_monitor.h (VIR_WRAPPER_SHELL_PREFIX)
(VIR_WRAPPER_SHELL_SUFFIX): New macros.
* src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrateToFile): Use
them.
* src/qemu/qemu_monitor_json.c (qemuMonitorJSONMigrateToFile):
Likewise.
---

Took longer than I thought, but this should do the trick with no
overhead on decent systems, and while still avoiding buggy dash ==
/bin/sh with something that works elsewhere.

This passes for me on Fedora, where /bin/sh is bash; testing on
Ubuntu or other debian-based system where /bin/sh is dash 0.5.5
would be appreciated.

No obvious errors crop up when testing this on Ubuntu 10.04:

   virsh # managedsave 1
   Domain 1 state saved by libvirt

Thanks for testing, and for Stefan's review.  I've pushed this now.

As a usability thing though, there doesn't seem to be a matching
"managedrestore" command in virsh, and the "help managedsave"
command is bit light on "how do we restart a saved domain?":

   # help managedsave
     NAME
       managedsave - managed save of a domain state

     SYNOPSIS
       managedsave<domain>

     DESCRIPTION
       Save and stop a running domain, so libvirt can restart it from
       the same state

Maybe wording along these lines would help:

help managedsave
...
Save and stop a running domain, so the next start will reuse the same state.

help start
...
Start a domain, either from the last managedsave state, or via a fresh boot.

Are we supposed to restart it using "start" or something?  (we need
to mention this, which I can follow up with a patch)

Yes, a followup patch would be nice.

--
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]