[libvirt] 1010824 - virsh suspend command should raise error for paused VM

As its summary says, BZ 1010824 requests that virsh suspend should raise error an error when called on a VM that's paused. Is the current behavior correct? Dave

On 10/04/2013 03:21 PM, Dave Allan wrote:
As its summary says, BZ 1010824 requests that virsh suspend should raise error an error when called on a VM that's paused. Is the current behavior correct?
Or more importantly, would changing the behavior break backward compatibility promises, where the best we can do is just document the current behavior? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Oct 04, 2013 at 04:32:54PM -0600, Eric Blake wrote:
On 10/04/2013 03:21 PM, Dave Allan wrote:
As its summary says, BZ 1010824 requests that virsh suspend should raise error an error when called on a VM that's paused. Is the current behavior correct?
Or more importantly, would changing the behavior break backward compatibility promises, where the best we can do is just document the current behavior?
It depends what you decide the semantics of the API are. eg the difference beetween "Move the VM to the paused state" vs "Ensure the VM is in the paused state". The way we have it implemented is really doing the latter, hence it would not be an error if the VM was already in the paused state. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

On Mon, Oct 07, 2013 at 10:42:47AM +0100, Daniel P. Berrange wrote:
On Fri, Oct 04, 2013 at 04:32:54PM -0600, Eric Blake wrote:
On 10/04/2013 03:21 PM, Dave Allan wrote:
As its summary says, BZ 1010824 requests that virsh suspend should raise error an error when called on a VM that's paused. Is the current behavior correct?
Or more importantly, would changing the behavior break backward compatibility promises, where the best we can do is just document the current behavior?
It depends what you decide the semantics of the API are. eg the difference beetween "Move the VM to the paused state" vs "Ensure the VM is in the paused state". The way we have it implemented is really doing the latter, hence it would not be an error if the VM was already in the paused state.
That's exactly what I wanted to clarify, and I think those are reasonable semantics, so I've closed as NOTABUG. Dave
participants (3)
-
Daniel P. Berrange
-
Dave Allan
-
Eric Blake