[libvirt] [PATCH 0/2] Another round of build fixes for lockd
by Jiri Denemark
make rpm finally succeeds with these two patches.
Jiri Denemark (2):
build: Install both qemu-lockd.conf and qemu-sanlock.conf
spec: Include lockd files in libvirt-daemon package
libvirt.spec.in | 4 ++++
src/Makefile.am | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
--
1.8.0.2
12 years
[libvirt] [test-API][PATCH v2] Add 2 vcpupin cases cover config and live flags
by Wayne Sun
v1: add 2 vcpupin cases
* use pinVcpuFlags to pin domain vcpu to host cpu
* 2 cases cover config and live flags
* cpulist with '^', '-' and ',' is supported to give multiple
host cpus
* vcpus and vcpuPinInfo are used as part of the checking
* a sample conf is added
v2: move format cpulist functions to utils
* the format cpulist functions could be reused for cases need
parse param with '-', '^' and ','.
Signed-off-by: Wayne Sun <gsun(a)redhat.com>
---
cases/vcpupin.conf | 67 +++++++++++++++++++++++
repos/setVcpus/vcpupin_config.py | 109 ++++++++++++++++++++++++++++++++++++++
repos/setVcpus/vcpupin_live.py | 101 +++++++++++++++++++++++++++++++++++
utils/utils.py | 71 ++++++++++++++++++++++++
4 files changed, 348 insertions(+), 0 deletions(-)
create mode 100644 cases/vcpupin.conf
create mode 100644 repos/setVcpus/vcpupin_config.py
create mode 100644 repos/setVcpus/vcpupin_live.py
diff --git a/cases/vcpupin.conf b/cases/vcpupin.conf
new file mode 100644
index 0000000..880247f
--- /dev/null
+++ b/cases/vcpupin.conf
@@ -0,0 +1,67 @@
+domain:install_linux_cdrom
+ guestname
+ $defaultname
+ guestos
+ $defaultos
+ guestarch
+ $defaultarch
+ vcpu
+ 4
+ memory
+ $defaultmem
+ hddriver
+ $defaulthd
+ nicdriver
+ $defaultnic
+ imageformat
+ qcow2
+
+setVcpus:vcpupin_live
+ guestname
+ $defaultname
+ vcpu
+ 0
+ cpulist
+ 2,4-6,^4
+
+setVcpus:vcpupin_live
+ guestname
+ $defaultname
+ vcpu
+ 1
+ cpulist
+ 3
+
+domain:destroy
+ guestname
+ $defaultname
+
+setVcpus:vcpupin_config
+ guestname
+ $defaultname
+ vcpu
+ 2
+ cpulist
+ 0-8,^1
+
+setVcpus:vcpupin_config
+ guestname
+ $defaultname
+ vcpu
+ 3
+ cpulist
+ ^2,0-8
+
+domain:start
+ guestname
+ $defaultname
+
+domain:destroy
+ guestname
+ $defaultname
+
+domain:undefine
+ guestname
+ $defaultname
+
+options cleanup=enable
diff --git a/repos/setVcpus/vcpupin_config.py b/repos/setVcpus/vcpupin_config.py
new file mode 100644
index 0000000..80df659
--- /dev/null
+++ b/repos/setVcpus/vcpupin_config.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+# Test domain vcpu pin with flag VIR_DOMAIN_AFFECT_CONFIG, check
+# domain config xml with vcpupin configuration.
+
+import re
+from xml.dom import minidom
+
+import libvirt
+from libvirt import libvirtError
+
+from src import sharedmod
+from utils import utils
+
+required_params = ('guestname', 'vcpu', 'cpulist',)
+optional_params = {}
+
+def vcpupin_check(domobj, vcpu, cpumap):
+ """check domain config xml with vcpupin element
+ """
+ guestxml = domobj.XMLDesc(2)
+ logger.debug("domain %s xml :\n%s" %(domobj.name(), guestxml))
+
+ doc = minidom.parseString(guestxml)
+ vcpupin = doc.getElementsByTagName('vcpupin')
+ if not vcpupin:
+ logger.error("no vcpupin element in domain xml")
+ return 1
+
+ for i in range(len(vcpupin)):
+ if vcpupin[i].hasAttribute('vcpu') and \
+ vcpupin[i].hasAttribute('cpuset'):
+ vcpu_attr = vcpupin[i].getAttributeNode('vcpu')
+ cpu_attr = vcpupin[i].getAttributeNode('cpuset')
+ if int(vcpu_attr.nodeValue) == vcpu:
+ cpulist = cpu_attr.nodeValue
+ if cpulist == '':
+ cpumap_tmp = ()
+ for i in range(maxcpu):
+ cpumap_tmp += (False,)
+ else:
+ cpumap_tmp = utils.param_to_tuple(cpulist, maxcpu)
+
+ if cpumap_tmp == cpumap:
+ logger.info("cpuset is as expected in domain xml")
+ return 0
+ else:
+ logger.error("cpuset is not as expected in domain xml")
+ return 1
+
+ if i == len(vcpupin) - 1:
+ logger.error("the vcpupin element with given vcpu is not found")
+ return 1
+
+def vcpupin_config(params):
+ """pin domain vcpu to host cpu with config flag
+ """
+ global logger
+ logger = params['logger']
+ params.pop('logger')
+ guestname = params['guestname']
+ vcpu = int(params['vcpu'])
+ cpulist = params['cpulist']
+
+ logger.info("the name of virtual machine is %s" % guestname)
+ logger.info("the given vcpu is %s" % vcpu)
+ logger.info("the given cpulist is %s" % cpulist)
+
+ global maxcpu
+ maxcpu = utils.get_host_cpus()
+ logger.info("%s physical cpu on host" % maxcpu)
+
+ conn = sharedmod.libvirtobj['conn']
+
+ try:
+ domobj = conn.lookupByName(guestname)
+ cpumap = utils.param_to_tuple(cpulist, maxcpu)
+
+ if not cpumap:
+ logger.error("cpulist: Invalid format")
+ return 1
+
+ logger.debug("cpumap for vcpu pin is:")
+ logger.debug(cpumap)
+
+ logger.info("pin domain vcpu %s to host cpulist %s with flag: %s" %
+ (vcpu, cpulist, libvirt.VIR_DOMAIN_AFFECT_CONFIG))
+ domobj.pinVcpuFlags(vcpu, cpumap, libvirt.VIR_DOMAIN_AFFECT_CONFIG)
+
+ logger.info("check vcpu pin info")
+ ret = domobj.vcpuPinInfo(libvirt.VIR_DOMAIN_AFFECT_CONFIG)
+ logger.debug("vcpu pin info is:")
+ logger.debug(ret)
+ if ret[vcpu] == cpumap:
+ logger.info("vcpu pin info is expected")
+ else:
+ logger.error("vcpu pin info is not expected")
+ return 1
+ except libvirtError, e:
+ logger.error("libvirt call failed: " + str(e))
+ return 1
+
+ logger.info("check domain vcpupin configuration in xml")
+ ret = vcpupin_check(domobj, vcpu, cpumap)
+ if ret:
+ logger.error("domain vcpu pin check failed")
+ return 1
+ else:
+ logger.info("domain vcpu pin check succeed")
+ return 0
diff --git a/repos/setVcpus/vcpupin_live.py b/repos/setVcpus/vcpupin_live.py
new file mode 100644
index 0000000..c3dfe8e
--- /dev/null
+++ b/repos/setVcpus/vcpupin_live.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+# Test domain vcpu pin with flag VIR_DOMAIN_AFFECT_LIVE, check
+# vcpu subprocess status under domain task list on host.
+
+import re
+
+import libvirt
+from libvirt import libvirtError
+
+from src import sharedmod
+from utils import utils
+
+required_params = ('guestname', 'vcpu', 'cpulist',)
+optional_params = {}
+
+def vcpupin_check(guestname, vcpu, cpumap):
+ """check vcpu subprocess status of the running virtual machine
+ grep Cpus_allowed_list /proc/PID/task/*/status
+ """
+ tmp_str = ''
+ cmd = "cat /var/run/libvirt/qemu/%s.pid" % guestname
+ status, pid = utils.exec_cmd(cmd, shell=True)
+ if status:
+ logger.error("failed to get the pid of domain %s" % guestname)
+ return 1
+
+ cmd = "grep Cpus_allowed_list /proc/%s/task/*/status" % pid[0]
+ status, output = utils.exec_cmd(cmd, shell=True)
+ logger.debug("command '%s' output is:" % cmd)
+ for i in range(len(output)):
+ tmp_str += ''.join(output[i]) + '\n'
+ logger.debug(tmp_str)
+
+ task_list = output[1:]
+ vcpu_task = task_list[int(vcpu)]
+ cpulist = vcpu_task.split('\t')[1]
+ ret = utils.param_to_tuple(cpulist, maxcpu)
+
+ if ret == cpumap:
+ logger.info("vcpu process cpus allowed list is expected")
+ return 0
+ else:
+ logger.error("vcpu process cpus allowed list is not expected")
+ return 1
+
+def vcpupin_live(params):
+ """pin domain vcpu to host cpu with live flag
+ """
+ global logger
+ logger = params['logger']
+ params.pop('logger')
+ guestname = params['guestname']
+ vcpu = int(params['vcpu'])
+ cpulist = params['cpulist']
+
+ logger.info("the name of virtual machine is %s" % guestname)
+ logger.info("the given vcpu is %s" % vcpu)
+ logger.info("the given cpulist is %s" % cpulist)
+
+ global maxcpu
+ maxcpu = utils.get_host_cpus()
+ logger.info("%s physical cpu on host" % maxcpu)
+
+ conn = sharedmod.libvirtobj['conn']
+
+ try:
+ domobj = conn.lookupByName(guestname)
+ cpumap = utils.param_to_tuple(cpulist, maxcpu)
+ if not cpumap:
+ logger.error("cpulist: Invalid format")
+ return 1
+
+ logger.debug("cpumap for vcpu pin is:")
+ logger.debug(cpumap)
+
+ logger.info("pin domain vcpu %s to host cpu %s with flag: %s" %
+ (vcpu, cpulist, libvirt.VIR_DOMAIN_AFFECT_LIVE))
+ domobj.pinVcpuFlags(vcpu, cpumap, libvirt.VIR_DOMAIN_AFFECT_LIVE)
+
+ logger.info("check vcpus info")
+ ret = domobj.vcpus()
+ logger.debug("vcpus info is:")
+ logger.debug(ret)
+ if ret[1][vcpu] == cpumap:
+ logger.info("vcpus info is expected")
+ else:
+ logger.error("vcpus info is not expected")
+ return 1
+
+ except libvirtError, e:
+ logger.error("libvirt call failed: " + str(e))
+ return 1
+
+ logger.info("check vcpu pin status on host")
+ ret = vcpupin_check(guestname, vcpu, cpumap)
+ if ret:
+ logger.error("domain vcpu pin failed")
+ return 1
+ else:
+ logger.info("domain vcpu pin succeed")
+ return 0
diff --git a/utils/utils.py b/utils/utils.py
index e242847..36171cf 100644
--- a/utils/utils.py
+++ b/utils/utils.py
@@ -645,6 +645,77 @@ def run_mount_app(hostname, username, password,
print "mount fail"
return 1
+def format_parammap(paramlist, map_test, length):
+ """paramlist contains numbers which can be divided by '-', '^' and
+ ',', map_test is a tuple for getting it's content (True or False)
+ and form the new tuple base on numbers in paramlist, length is
+ the length of the return tuple
+ """
+ parammap = ()
+
+ try:
+ if re.match('\^', paramlist):
+ unuse = int(re.split('\^', paramlist)[1])
+ for i in range(length):
+ if i == unuse:
+ parammap += (False,)
+ else:
+ parammap += (map_test[i],)
+
+ elif '-' in paramlist:
+ param = re.split('-', paramlist)
+ if not len(param) == 2:
+ return False
+ if not int(param[1]) < length:
+ print "paramlist: out of max range"
+ return False
+ if int(param[1]) < int(param[0]):
+ return False
+
+ for i in range(length):
+ if i in range(int(param[0]), int(param[1])+1):
+ parammap += (True,)
+ else:
+ parammap += (map_test[i],)
+
+ else:
+ for i in range(length):
+ if i == int(paramlist):
+ parammap += (True,)
+ else:
+ parammap += (map_test[i],)
+
+ return parammap
+ except ValueError, e:
+ print "ValueError: " + str(e)
+ return False
+
+def param_to_tuple(paramlist, length):
+ """paramlist contains numbers which can be divided by '-', '^' and
+ ',', length is the length of the return tuple, return tuple only
+ have True or False value
+ """
+ map_test = ()
+ for i in range(length):
+ map_test += (False,)
+
+ if ',' in paramlist:
+ param = re.split(',', paramlist)
+ for i in range(len(param)):
+ parammap = format_parammap(param[i], map_test, length)
+ if parammap:
+ map_test = parammap
+ else:
+ return False
+ return parammap
+
+ else:
+ parammap = format_parammap(paramlist, map_test, length)
+ if parammap:
+ return parammap
+ else:
+ return False
+
def run_wget_app(hostname, username, password, file_url, logger):
"""Simple test for wget app on specified host"""
cmd_line = "wget -P /tmp %s -o /tmp/wget.log" % (file_url)
--
1.7.1
12 years
[libvirt] [PATCH] qemu: don't fail update netdev on bridge detach failure
by Laine Stump
When a network device's bridge connection is changed by
virDomainUpdateDevice, libvirt first removes the netdev's tap from its
old bridge, then adds it to the new bridge. Sometimes, due to a
network being destroyed while a guest device is still attached, the
tap may already be "removed" from the old bridge (or the old bridge
may not even exist any more); the existing code was needlessly failing
the update when this happened, making it impossible to recover from
the situation without completely detaching (i.e. removing) the netdev
from the guest and re-attaching.
Instead of failing the entire operation when removal of the tap from
the old bridge fails, this patch changes qemuDomainChangeNetBridge to
just log a warning and continue, allowing a reasonable recover from
the situation.
(you'll appreciate this change if you ever accidentally destroy a
network while your guests are still using it).
---
src/qemu/qemu_hotplug.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 3dfdb65..e9a5e35 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1306,8 +1306,14 @@ qemuDomainChangeNetBridge(virConnectPtr conn,
if (oldbridge) {
ret = virNetDevBridgeRemovePort(oldbridge, olddev->ifname);
virDomainAuditNet(vm, olddev, NULL, "detach", ret == 0);
- if (ret < 0)
- goto cleanup;
+ if (ret < 0) {
+ /* warn but continue - possibly the old network
+ * had been destroyed and reconstructed, leaving the
+ * tap device orphaned.
+ */
+ VIR_WARN("Unable to detach device %s from bridge %s",
+ olddev->ifname, oldbridge);
+ }
}
ret = virNetDevBridgeAddPort(newbridge, olddev->ifname);
--
1.7.11.7
12 years
[libvirt] [PATCH] build: use fewer cat processes
by Eric Blake
* src/Makefile.am (libvirt.syms): Let cat loop for us.
---
I'll wait for a review before pushing, rather than claiming it is trivial.
src/Makefile.am | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 33b4ab0..cf6096a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1457,9 +1457,7 @@ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
printf '\n\n# Private symbols\n\n' >>$@-tmp && \
printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \
printf 'global:\n\n' >>$@-tmp && \
- for file in $(USED_SYM_FILES); do \
- cat $$file >>$@-tmp; \
- done && \
+ cat $(USED_SYM_FILES) >>$@-tmp && \
printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
chmod a-w $@-tmp && \
mv $@-tmp libvirt.syms
--
1.8.0.2
12 years
[libvirt] [PATCH] build: Distribute more files
by Jiri Denemark
---
src/Makefile.am | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 2791cb6..33b4ab0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -367,6 +367,7 @@ check-symfile:
endif
check-symsorting:
$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl $(USED_SYM_FILES)
+EXTRA_DIST += check-symfile.pl check-symsorting.pl
PROTOCOL_STRUCTS = \
$(srcdir)/remote_protocol-structs \
@@ -389,7 +390,7 @@ else !WITH_REMOTE
# re-generated when configured --without-remote.
check-protocol:
endif
-EXTRA_DIST += $(PROTOCOL_STRUCTS) check-symfile.pl
+EXTRA_DIST += $(PROTOCOL_STRUCTS)
check-local: check-protocol check-symfile check-symsorting
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
@@ -1575,6 +1576,9 @@ lockd_la_SOURCES = \
lockd_la_CFLAGS = -I$(top_srcdir)/src/conf $(AM_CFLAGS)
lockd_la_LDFLAGS = -module -avoid-version
lockd_la_LIBADD = ../gnulib/lib/libgnu.la libvirt-net-rpc.la libvirt-net-rpc-client.la
+augeas_DATA += locking/libvirt_lockd.aug
+augeastest_DATA += test_libvirt_lockd.aug
+CLEANFILES += test_libvirt_lockd.aug
if WITH_DTRACE_PROBES
lockd_la_LIBADD += libvirt_probes.lo
endif
@@ -1620,7 +1624,10 @@ EXTRA_DIST += $(LOCK_DAEMON_SOURCES) \
$(LOCK_DRIVER_LOCKD_SOURCES)
endif
-EXTRA_DIST += locking/virtlockd.sysconf
+EXTRA_DIST += locking/virtlockd.sysconf \
+ locking/lockd.conf \
+ locking/libvirt_lockd.aug \
+ locking/test_libvirt_lockd.aug.in
install-sysconfig:
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
--
1.8.0.2
12 years
[libvirt] [PATCH] selinux: fix NULL dereference in GetSecurityMountOptions
by Ján Tomko
In the case of an OOM error in virDomainDefGetSecurityLabelDef, secdef
is set to NULL, then dereferenced while printing the debug message.
---
src/security/security_selinux.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index 5409e32..9134bc8 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -1993,7 +1993,8 @@ virSecuritySELinuxGetSecurityMountOptions(virSecurityManagerPtr mgr,
return NULL;
}
- VIR_DEBUG("imageLabel=%s opts=%s", secdef->imagelabel, opts);
+ VIR_DEBUG("imageLabel=%s opts=%s",
+ secdef ? secdef->imagelabel : "(null)", opts);
return opts;
}
--
1.7.8.6
12 years
[libvirt] [PATCH] build: Fix VPATH build
by Jiri Denemark
$(srcdir) is already part of $$file since commit f1f9a7ac7e.
---
Pushed as a build-breaker.
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index bb80992..7c2d8ed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1451,7 +1451,7 @@ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
printf 'LIBVIRT_PRIVATE_$(VERSION) {\n\n' >>$@-tmp && \
printf 'global:\n\n' >>$@-tmp && \
for file in $(USED_SYM_FILES); do \
- cat $(srcdir)/$$file >>$@-tmp; \
+ cat $$file >>$@-tmp; \
done && \
printf '\n\nlocal:\n*;\n\n};' >>$@-tmp && \
chmod a-w $@-tmp && \
--
1.8.0.2
12 years
[libvirt] [PATCH] network: prevent dnsmasq from listening on localhost
by Laine Stump
This patch resolves the problem reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=886663
The source of the problem was the fix for CVE 2011-3411:
https://bugzilla.redhat.com/show_bug.cgi?id=833033
which was originally committed upstream in commit
753ff83a50263d6975f88d6605d4b5ddfcc97560. That commit improperly
removed the "--except-interface lo" from dnsmasq commandlines when
--bind-dynamic was used (based on comments in the latter bug).
It turns out that the problem reported in the CVE could be eliminated
without removing "--except-interface lo", and removing it actually
caused each instance of dnsmasq to listen on localhost on port 53,
which created a new problem:
If another instance of dnsmasq using "bind-interfaces" (instead of
"bind-dynamic") had already been started (or if another instance
started later used "bind-dynamic"), this wouldn't have any immediately
visible ill effects, but if you tried to start another dnsmasq
instance using "bind-interfaces" *after* starting any libvirt
networks, the new dnsmasq would fail to start, because there was
already another process listening on port 53.
(Subsequent to the CVE fix, another patch changed the network driver
to put dnsmasq options in a conf file rather than directly on the
dnsmasq commandline, but preserved the same options.)
This patch changes the network driver to *always* add
"except-interface=lo" to dnsmasq conf files, regardless of whether we use
bind-dynamic or bind-interfaces. This way no libvirt dnsmasq instances
are listening on localhost (and the CVE is still fixed).
The actual code change is miniscule, but must be propogated through all
of the test files as well.
---
src/network/bridge_driver.c | 7 ++++---
tests/networkxml2confdata/dhcp6-nat-network.conf | 1 +
tests/networkxml2confdata/dhcp6-network.conf | 1 +
tests/networkxml2confdata/dhcp6host-routed-network.conf | 1 +
tests/networkxml2confdata/isolated-network.conf | 2 +-
tests/networkxml2confdata/nat-network-dns-hosts.conf | 1 +
tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf | 2 +-
tests/networkxml2confdata/nat-network-dns-srv-record.conf | 1 +
tests/networkxml2confdata/nat-network-dns-txt-record.conf | 1 +
tests/networkxml2confdata/nat-network.conf | 1 +
tests/networkxml2confdata/netboot-network.conf | 2 +-
tests/networkxml2confdata/netboot-proxy-network.conf | 2 +-
tests/networkxml2confdata/routed-network.conf | 1 +
13 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 4e1958d..a32755d 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -689,6 +689,9 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
if (pidfile)
virBufferAsprintf(&configbuf, "pid-file=%s\n", pidfile);
+ /* dnsmasq will *always* listen on localhost unless told otherwise */
+ virBufferAddLit(&configbuf, "except-interface=lo\n");
+
if (dnsmasqCapsGet(caps, DNSMASQ_CAPS_BIND_DYNAMIC)) {
/* using --bind-dynamic with only --interface (no
* --listen-address) prevents dnsmasq from responding to dns
@@ -702,9 +705,7 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
"interface=%s\n",
network->def->bridge);
} else {
- virBufferAddLit(&configbuf,
- "bind-interfaces\n"
- "except-interface=lo\n");
+ virBufferAddLit(&configbuf, "bind-interfaces\n");
/*
* --interface does not actually work with dnsmasq < 2.47,
* due to DAD for ipv6 addresses on the interface.
diff --git a/tests/networkxml2confdata/dhcp6-nat-network.conf b/tests/networkxml2confdata/dhcp6-nat-network.conf
index d488900..050f3db 100644
--- a/tests/networkxml2confdata/dhcp6-nat-network.conf
+++ b/tests/networkxml2confdata/dhcp6-nat-network.conf
@@ -7,6 +7,7 @@
strict-order
domain-needed
local=//
+except-interface=lo
bind-dynamic
interface=virbr0
dhcp-range=192.168.122.2,192.168.122.254
diff --git a/tests/networkxml2confdata/dhcp6-network.conf b/tests/networkxml2confdata/dhcp6-network.conf
index 5c1030c..5fde07f 100644
--- a/tests/networkxml2confdata/dhcp6-network.conf
+++ b/tests/networkxml2confdata/dhcp6-network.conf
@@ -9,6 +9,7 @@ domain-needed
domain=mynet
expand-hosts
local=/mynet/
+except-interface=lo
bind-dynamic
interface=virbr0
dhcp-range=2001:db8:ac10:fd01::1:10,2001:db8:ac10:fd01::1:ff
diff --git a/tests/networkxml2confdata/dhcp6host-routed-network.conf b/tests/networkxml2confdata/dhcp6host-routed-network.conf
index cb4d0cc..f8f05c2 100644
--- a/tests/networkxml2confdata/dhcp6host-routed-network.conf
+++ b/tests/networkxml2confdata/dhcp6host-routed-network.conf
@@ -7,6 +7,7 @@
strict-order
domain-needed
local=//
+except-interface=lo
bind-dynamic
interface=virbr1
dhcp-range=192.168.122.1,static
diff --git a/tests/networkxml2confdata/isolated-network.conf b/tests/networkxml2confdata/isolated-network.conf
index 55a44d3..f8997bd 100644
--- a/tests/networkxml2confdata/isolated-network.conf
+++ b/tests/networkxml2confdata/isolated-network.conf
@@ -7,8 +7,8 @@
strict-order
domain-needed
local=//
-bind-interfaces
except-interface=lo
+bind-interfaces
listen-address=192.168.152.1
dhcp-option=3
no-resolv
diff --git a/tests/networkxml2confdata/nat-network-dns-hosts.conf b/tests/networkxml2confdata/nat-network-dns-hosts.conf
index ae8f8c5..2577882 100644
--- a/tests/networkxml2confdata/nat-network-dns-hosts.conf
+++ b/tests/networkxml2confdata/nat-network-dns-hosts.conf
@@ -9,6 +9,7 @@ domain-needed
domain=example.com
expand-hosts
local=/example.com/
+except-interface=lo
bind-dynamic
interface=virbr0
addn-hosts=/var/lib/libvirt/dnsmasq/default.addnhosts
diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf
index faa36e6..1e9b59c 100644
--- a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf
+++ b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf
@@ -7,8 +7,8 @@
strict-order
domain-needed
local=//
-bind-interfaces
except-interface=lo
+bind-interfaces
listen-address=192.168.122.1
listen-address=192.168.123.1
listen-address=fc00:db8:ac10:fe01::1
diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.conf b/tests/networkxml2confdata/nat-network-dns-srv-record.conf
index 6079912..53d044a 100644
--- a/tests/networkxml2confdata/nat-network-dns-srv-record.conf
+++ b/tests/networkxml2confdata/nat-network-dns-srv-record.conf
@@ -7,6 +7,7 @@
strict-order
domain-needed
local=//
+except-interface=lo
bind-dynamic
interface=virbr0
srv-host=name.tcp.test-domain-name,.,1024,10,10
diff --git a/tests/networkxml2confdata/nat-network-dns-txt-record.conf b/tests/networkxml2confdata/nat-network-dns-txt-record.conf
index c448bdc..921cae1 100644
--- a/tests/networkxml2confdata/nat-network-dns-txt-record.conf
+++ b/tests/networkxml2confdata/nat-network-dns-txt-record.conf
@@ -7,6 +7,7 @@
strict-order
domain-needed
local=//
+except-interface=lo
bind-dynamic
interface=virbr0
txt-record=example,example value
diff --git a/tests/networkxml2confdata/nat-network.conf b/tests/networkxml2confdata/nat-network.conf
index 8f28fef..beb714b 100644
--- a/tests/networkxml2confdata/nat-network.conf
+++ b/tests/networkxml2confdata/nat-network.conf
@@ -7,6 +7,7 @@
strict-order
domain-needed
local=//
+except-interface=lo
bind-dynamic
interface=virbr0
dhcp-range=192.168.122.2,192.168.122.254
diff --git a/tests/networkxml2confdata/netboot-network.conf b/tests/networkxml2confdata/netboot-network.conf
index 83dd2b3..b6f3c23 100644
--- a/tests/networkxml2confdata/netboot-network.conf
+++ b/tests/networkxml2confdata/netboot-network.conf
@@ -9,8 +9,8 @@ domain-needed
domain=example.com
expand-hosts
local=/example.com/
-bind-interfaces
except-interface=lo
+bind-interfaces
listen-address=192.168.122.1
dhcp-range=192.168.122.2,192.168.122.254
dhcp-no-override
diff --git a/tests/networkxml2confdata/netboot-proxy-network.conf b/tests/networkxml2confdata/netboot-proxy-network.conf
index b266d81..1e969fa 100644
--- a/tests/networkxml2confdata/netboot-proxy-network.conf
+++ b/tests/networkxml2confdata/netboot-proxy-network.conf
@@ -9,8 +9,8 @@ domain-needed
domain=example.com
expand-hosts
local=/example.com/
-bind-interfaces
except-interface=lo
+bind-interfaces
listen-address=192.168.122.1
dhcp-range=192.168.122.2,192.168.122.254
dhcp-no-override
diff --git a/tests/networkxml2confdata/routed-network.conf b/tests/networkxml2confdata/routed-network.conf
index dc53a4e..62ffd7a 100644
--- a/tests/networkxml2confdata/routed-network.conf
+++ b/tests/networkxml2confdata/routed-network.conf
@@ -7,6 +7,7 @@
strict-order
domain-needed
local=//
+except-interface=lo
bind-dynamic
interface=virbr1
addn-hosts=/var/lib/libvirt/dnsmasq/local.addnhosts
--
1.7.11.7
12 years
[libvirt] [PATCH] locking: Fix VPATH build and distribute generated files
by Jiri Denemark
---
src/Makefile.am | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c2d8ed..5a9fb84 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -149,19 +149,22 @@ LOCK_DRIVER_SANLOCK_HELPER_SOURCES = \
locking/sanlock_helper.c
LOCK_PROTOCOL_GENERATED = \
- locking/lock_protocol.h \
- locking/lock_protocol.c \
+ $(srcdir)/locking/lock_protocol.h \
+ $(srcdir)/locking/lock_protocol.c \
$(NULL)
-EXTRA_DIST += locking/lock_protocol.x
+LOCK_PROTOCOL = $(srcdir)/locking/lock_protocol.x
+EXTRA_DIST += $(LOCK_PROTOCOL) \
+ $(LOCK_PROTOCOL_GENERATED)
BUILT_SOURCES += $(LOCK_PROTOCOL_GENERATED)
MAINTAINERCLEANFILES += $(LOCK_PROTOCOL_GENERATED)
LOCK_DAEMON_GENERATED = \
- locking/lock_daemon_dispatch_stubs.h
+ $(srcdir)/locking/lock_daemon_dispatch_stubs.h
$(NULL)
BUILT_SOURCES += $(LOCK_DAEMON_GENERATED)
+EXTRA_DIST += $(LOCK_DAEMON_GENERATED)
MAINTAINERCLEANFILES += $(LOCK_DAEMON_GENERATED)
LOCK_DRIVER_LOCKD_SOURCES = \
@@ -177,8 +180,11 @@ LOCK_DAEMON_SOURCES = \
locking/lock_daemon_dispatch.h \
$(NULL)
-$(srcdir)/locking/lock_daemon_dispatch_stubs.h: locking/lock_protocol.x $(srcdir)/rpc/gendispatch.pl Makefile.am
- $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl -b virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL $< > $@
+$(srcdir)/locking/lock_daemon_dispatch_stubs.h: $(LOCK_PROTOCOL) \
+ $(srcdir)/rpc/gendispatch.pl Makefile.am
+ $(AM_V_GEN)perl -w $(srcdir)/rpc/gendispatch.pl \
+ -b virLockSpaceProtocol VIR_LOCK_SPACE_PROTOCOL \
+ $(LOCK_PROTOCOL) > $@
NETDEV_CONF_SOURCES = \
--
1.8.0.2
12 years
[libvirt] [PATCH] build: Distribute more files
by Jiri Denemark
---
src/Makefile.am | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 2791cb6..33b4ab0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -367,6 +367,7 @@ check-symfile:
endif
check-symsorting:
$(AM_V_GEN)$(PERL) $(srcdir)/check-symsorting.pl $(USED_SYM_FILES)
+EXTRA_DIST += check-symfile.pl check-symsorting.pl
PROTOCOL_STRUCTS = \
$(srcdir)/remote_protocol-structs \
@@ -389,7 +390,7 @@ else !WITH_REMOTE
# re-generated when configured --without-remote.
check-protocol:
endif
-EXTRA_DIST += $(PROTOCOL_STRUCTS) check-symfile.pl
+EXTRA_DIST += $(PROTOCOL_STRUCTS)
check-local: check-protocol check-symfile check-symsorting
.PHONY: check-protocol $(PROTOCOL_STRUCTS:structs=struct)
@@ -1575,6 +1576,9 @@ lockd_la_SOURCES = \
lockd_la_CFLAGS = -I$(top_srcdir)/src/conf $(AM_CFLAGS)
lockd_la_LDFLAGS = -module -avoid-version
lockd_la_LIBADD = ../gnulib/lib/libgnu.la libvirt-net-rpc.la libvirt-net-rpc-client.la
+augeas_DATA += locking/libvirt_lockd.aug
+augeastest_DATA += test_libvirt_lockd.aug
+CLEANFILES += test_libvirt_lockd.aug
if WITH_DTRACE_PROBES
lockd_la_LIBADD += libvirt_probes.lo
endif
@@ -1620,7 +1624,10 @@ EXTRA_DIST += $(LOCK_DAEMON_SOURCES) \
$(LOCK_DRIVER_LOCKD_SOURCES)
endif
-EXTRA_DIST += locking/virtlockd.sysconf
+EXTRA_DIST += locking/virtlockd.sysconf \
+ locking/lockd.conf \
+ locking/libvirt_lockd.aug \
+ locking/test_libvirt_lockd.aug.in
install-sysconfig:
mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
--
1.8.0.2
12 years