Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-24 Thread Jiri Denemark
On Tue, Aug 23, 2011 at 14:31:29 +0100, Daniel P. Berrange wrote: On Tue, Aug 23, 2011 at 02:36:02PM +0200, Michal Privoznik wrote: On 22.08.2011 20:31, Daniel P. Berrange wrote: We need to make this more controllable by apps, by making it possible to send just the SIGTERM and not the

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-24 Thread Daniel P. Berrange
On Wed, Aug 24, 2011 at 09:53:49AM +0200, Jiri Denemark wrote: On Tue, Aug 23, 2011 at 14:31:29 +0100, Daniel P. Berrange wrote: On Tue, Aug 23, 2011 at 02:36:02PM +0200, Michal Privoznik wrote: On 22.08.2011 20:31, Daniel P. Berrange wrote: We need to make this more controllable by

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-23 Thread Michal Privoznik
On 22.08.2011 20:31, Daniel P. Berrange wrote: On Mon, Aug 22, 2011 at 05:33:12PM +0100, Daniel P. Berrange wrote: On Mon, Aug 22, 2011 at 09:29:56AM -0600, Eric Blake wrote: On 08/22/2011 09:21 AM, Daniel P. Berrange wrote: If we had a separate API for sending 'quit' on the monitor, then the

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-23 Thread Daniel P. Berrange
On Tue, Aug 23, 2011 at 02:36:02PM +0200, Michal Privoznik wrote: On 22.08.2011 20:31, Daniel P. Berrange wrote: On Mon, Aug 22, 2011 at 05:33:12PM +0100, Daniel P. Berrange wrote: On Mon, Aug 22, 2011 at 09:29:56AM -0600, Eric Blake wrote: On 08/22/2011 09:21 AM, Daniel P. Berrange wrote:

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Daniel Veillard
On Sat, Aug 20, 2011 at 01:06:10PM +0200, Michal Privoznik wrote: This patch introduces support for domain destroying via 'quit' monitor command which gives qemu time to flush caches and therefore prevent disks corruption. However, qemu can be unresponsive and to prevent waiting indefinitely,

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Daniel P. Berrange
On Sat, Aug 20, 2011 at 01:06:10PM +0200, Michal Privoznik wrote: This patch introduces support for domain destroying via 'quit' monitor command which gives qemu time to flush caches and therefore prevent disks corruption. However, qemu can be unresponsive and to prevent waiting indefinitely,

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Michal Privoznik
On 22.08.2011 12:27, Daniel P. Berrange wrote: On Sat, Aug 20, 2011 at 01:06:10PM +0200, Michal Privoznik wrote: This patch introduces support for domain destroying via 'quit' monitor command which gives qemu time to flush caches and therefore prevent disks corruption. However, qemu can be

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Eric Blake
On 08/22/2011 04:49 AM, Michal Privoznik wrote: I don't think that's problem. High priority calls must be guaranteed to end in reasonably short time. And although we talk to monitor here, we are guaranteed to end. Therefore no need to change my previous patch. No, we are not guaranteed to end

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Eric Blake
On 08/22/2011 07:22 AM, Eric Blake wrote: On 08/22/2011 04:49 AM, Michal Privoznik wrote: I don't think that's problem. High priority calls must be guaranteed to end in reasonably short time. And although we talk to monitor here, we are guaranteed to end. Therefore no need to change my

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Michal Privoznik
On 22.08.2011 15:30, Eric Blake wrote: On 08/22/2011 07:22 AM, Eric Blake wrote: On 08/22/2011 04:49 AM, Michal Privoznik wrote: I don't think that's problem. High priority calls must be guaranteed to end in reasonably short time. And although we talk to monitor here, we are guaranteed to

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Daniel P. Berrange
On Mon, Aug 22, 2011 at 12:49:48PM +0200, Michal Privoznik wrote: On 22.08.2011 12:27, Daniel P. Berrange wrote: On Sat, Aug 20, 2011 at 01:06:10PM +0200, Michal Privoznik wrote: This patch introduces support for domain destroying via 'quit' monitor command which gives qemu time to flush

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Eric Blake
On 08/22/2011 09:21 AM, Daniel P. Berrange wrote: If we had a separate API for sending 'quit' on the monitor, then the mgmt app can decide how long to wait for the graceful shutdown of QEMU before resorting to the hard virDomainDestroy command. If the app knows that there is high I/O load, then

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Daniel P. Berrange
On Mon, Aug 22, 2011 at 09:29:56AM -0600, Eric Blake wrote: On 08/22/2011 09:21 AM, Daniel P. Berrange wrote: If we had a separate API for sending 'quit' on the monitor, then the mgmt app can decide how long to wait for the graceful shutdown of QEMU before resorting to the hard

Re: [libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-22 Thread Daniel P. Berrange
On Mon, Aug 22, 2011 at 05:33:12PM +0100, Daniel P. Berrange wrote: On Mon, Aug 22, 2011 at 09:29:56AM -0600, Eric Blake wrote: On 08/22/2011 09:21 AM, Daniel P. Berrange wrote: If we had a separate API for sending 'quit' on the monitor, then the mgmt app can decide how long to wait for the

[libvirt] [PATCH] qemu: Allow graceful domain destroy

2011-08-20 Thread Michal Privoznik
This patch introduces support for domain destroying via 'quit' monitor command which gives qemu time to flush caches and therefore prevent disks corruption. However, qemu can be unresponsive and to prevent waiting indefinitely, execute command in a separate thread and wait reasonable time