[libvirt] [PATCH] virDomainShutdown*: Describe blocking behaviour

Eric Blake eblake at redhat.com
Mon Mar 30 20:38:24 UTC 2015


On 03/30/2015 06:07 AM, Michal Privoznik wrote:
> The description to both virDomainShutdown() and
> virDomainShutdownFlags() is quite misleading when it comes to
> blocking behaviour of these two APIs. Firstly, we support many
> shutdown methods, from signalizing an ACPI event, through sending
> a signal to guest agent assisted shutdown. Some of these methods
> make the API return immediately, while others block the API until
> domain is actually shut of. And since virDomainShutdown() is

s/of/off/

> equivalent to calling virDomainShutdownFlags(0), it's up to each
> driver which methods to try. So the bare virDomainShutdown() may
> block or may return immediately at the same time. I know, it's
> confusing, but at least let users know.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  src/libvirt-domain.c | 13 +++++++++----
>  1 file changed, 9 insertions(+), 4 deletions(-)
> 

I don't think this is the right approach.  It is okay to block for a
small finite amount of time, but if the guest agent really is something
that can hang, we should fix that code to return without waiting for the
agent response.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150330/ae774c3d/attachment-0001.sig>


More information about the libvir-list mailing list