[libvirt] [PATCH 0/2] Check domain status before virsh suspend or resume

Eric Blake eblake at redhat.com
Mon Apr 15 17:23:09 UTC 2013


On 04/15/2013 11:04 AM, Daniel P. Berrange wrote:
> On Mon, Apr 15, 2013 at 12:49:12PM -0400, John Ferlan wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=906644
>>
>> Added checks to both virsh suspend and virsh resume for the domain to be
>> in a the right state before trying the suspend/resume. Similar checks to
>> examples/domsuspend/suspend.c.
> 
> IMHO this is just a pointless bug request. State checks don't
> belong in virsh for a start, since that makes it inherantly
> racey. While the drivers do check for whether the domain is
> running, they explicitly chose not to raise an error if the
> VM is already paused, when pause is executed & vica-verca

I agree that doing it in virsh is too racy.  If anything, we would need
to implement new virDomainSuspendFlags() and virDomainResumeFlags() to
let the user pass in a flag that controls whether or not they want
libvirtd to reject a no-op state change (we can't change the default in
libvirtd, for fear of breaking existing clients, but the only way to do
a non-racy non-default behavior is to add a flag which requires adding API).

-- 
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130415/8440b6e4/attachment-0001.sig>


More information about the libvir-list mailing list