Re: [PATCHv2 2/2] qemu: snapshot: Forbid taking/reverting snapshots in PMSUSPENDED state

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

 



On 07/21/14 20:44, Eric Blake wrote:
> On 07/21/2014 08:08 AM, Peter Krempa wrote:
>> Qemu doesn't currently support them and behaves strangely. Just forbid
>> them.
>>
>> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1079162
>> ---
>>  src/qemu/qemu_driver.c | 15 ++++++++++++---
>>  1 file changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
>> index 91baa7d..eae23d3 100644
>> --- a/src/qemu/qemu_driver.c
>> +++ b/src/qemu/qemu_driver.c
>> @@ -13401,9 +13401,14 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
>>      case VIR_DOMAIN_SHUTDOWN:
>>      case VIR_DOMAIN_SHUTOFF:
>>      case VIR_DOMAIN_CRASHED:
>> -    case VIR_DOMAIN_PMSUSPENDED:
>>          break;
>>
>> +    case VIR_DOMAIN_PMSUSPENDED:
>> +        virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
>> +                       _("qemu doesn't support taking snapshots of "
>> +                         "PMSUSPENDED guests"));
>> +        goto cleanup;
>> +
> 
> This is a bit harsh; a bit nicer might be to take the snapshot anyways
> but to have the snapshot be in the running state (as if the act of
> taking the snapshot caused a pmwakeup event).  But that's more
> complicated, and changes domain state implicitly, while this approach is
> vocal to the user why we can't do it (and if qemu ever DOES add support,
> we just gate this code by a capability detection bit).

Well that would be a bit more wrong in my eyes than allowing the
snapshot and leaving it in a crippled state until qemu fixes it's part.

We would need to introduce a lot of code that would handle the
transitions and I doubt that it would get much use. Same as I think that
after qemu possibly fixes the problem it will be forgotten for a long time.

> 
> ACK.
> 

Anyways, I'll push this patch now as I don't think it's worth spending
more time on this.

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]