[libvirt] [PATCH] leaseshelper: add enhancements to support all events

Eric Blake eblake at redhat.com
Thu Jul 17 16:08:46 UTC 2014


On 07/17/2014 09:18 AM, Peter Krempa wrote:

>>> A second issue that comes into my mind is compatibility with already
>>> existing files. Does this work when you already have a lease file? (I
>>> didn't try it, I'm just asking).
>>
>> If we use the --leasefile-ro option, then although this method will
>> work, but no, the lease file will *not* be read/written at all. So
>> even if an old one exists, its of no use.
>> But then again, the use of --leasefile-ro is mandatory, so that all
>> events are captured by our helper program. For example, renew of a
>> lease.
> 
> My concerns are whether this will work in the case you already used the
> leases helper as the patch is adding a few fields to the stored format.

In particular, this scenario MUST work:

A user installs libvirt 1.2.6, and starts a guest (which creates a
leases file and longrunning helper app).  Then the user upgrades to
libvirt 1.2.7 and restarts libvirtd.  The new libvirt MUST be able to
interact with the running guest that is still using the older-style
leases file and helper app, with no loss of behavior to the guest.

Also, this scenario MUST work:

A user installs libvirt 1.2.6.  Then they upgrade to libvirt 1.2.7, but
without restarting libvirtd.  Then they start a guest.  Note that the
upgrade means that the leaseshelper application that will be started is
the 1.2.7 build, but the command line to start it will be triggered by
the 1.2.6 libvirtd.  The new helper must do everything that the old
helper did, so that the old libvirtd does not have any hiccups in operation.

The easiest way to ensure that both directions of version mismatch are
well-behaved is to make sure that either side can be newer than the
other, that the changes are purely additive in nature, and that there
are sane defaults in place in the newer code when dealing with the older
data that lacks the additions.  Also, while upgrade is a required
scenario, downgrade generally is not (going from 1.2.7 back to 1.2.6
while a guest is still running, or expecting 1.2.7 libvirtd to be able
to use 1.2.6 leaseshelper, is nice if it works but not a showstopper if
it doesn't).

-- 
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/20140717/0ea35b88/attachment-0001.sig>


More information about the libvir-list mailing list