On 06/24/2011 07:02 AM, Daniel P. Berrange wrote:
Introduce a configuration file with a single parameter
'require_lease_for_disks', which is used to decide whether
it is allowed to start a guest which has read/write disks,
but without any leases.
* libvirt.spec.in: Add sanlock config file and augeas
lens
* src/Makefile.am: Install sanlock config file and
augeas lens
* src/locking/libvirt_sanlock.aug: Augeas master lens
* src/locking/test_libvirt_sanlock.aug: Augeas test file
* src/locking/sanlock.conf: Example sanlock config
* src/locking/lock_driver_sanlock.c: Wire up loading
of configuration file
---
libvirt.spec.in | 3 +
src/Makefile.am | 25 ++++++++++-
src/locking/libvirt_sanlock.aug | 31 ++++++++++++++
src/locking/lock_driver_sanlock.c | 77 ++++++++++++++++++++++++++++++++-
src/locking/sanlock.conf | 6 +++
src/locking/test_libvirt_sanlock.aug | 7 +++
6 files changed, 144 insertions(+), 5 deletions(-)
create mode 100644 src/locking/libvirt_sanlock.aug
create mode 100644 src/locking/sanlock.conf
create mode 100644 src/locking/test_libvirt_sanlock.aug
+EXTRA_DIST += locking/sanlock.conf \
+ locking/libvirt_sanlock.aug \
+ locking/test_libvirt_sanlock.aug
+
+$(builddir)/locking/%-sanlock.conf: $(srcdir)/locking/sanlock.conf
+ $(AM_V_GEN)mkdir locking ; \
+ cp $< $@
This still looks a bit complex to me; I think it might be possible to
simplify to just add $(srcdir)/locking/sanlock.conf into EXTRA_DIST
rather than going through cp. But I'd rather see this commit go in now,
and save that for a later cleanup, rather than miss getting this commit
into the release, because it will take me some time to test my proposal
with VPATH builds and 'make distcheck'.
ACK
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org