[libvirt] LXC: autostart feature does set all interfaces to state up.
by Richard Weinberger
Hi!
If you have multiple LXC containers with networking and the autostart feature enabled libvirtd fails to
up some veth interfaces on the host side.
Most of the time only the first veth device is in state up, all others are down.
Reproducing is easy.
1. Define a few containers (5 in my case)
2. Run "virsh autostart ..." on each one.
3. stop/start libvirtd
You'll observe that all containers are running, but "ip a" will report on the host
side that not all veth devices are up and are not usable within the containers.
This is not userns related, just retested with libvirt of today.
Thanks,
//richard
11 years, 4 months
[libvirt] Second pass as virt-login-shell
by dwalsh@redhat.com
I believe I have gotten all of Dan B comments implemented, with a couple of
changes.
1. I no longer allow root to execute the command.
2. Rather then allow the globbing syntax for allowed_users in the config, I
added the abiltiy to specify groups.
[PATCH] virt-login-shell joins users into lxc container.
11 years, 4 months
[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
Upstream gnulib recently patched a bug in bootstrap, for projects
that use a different name than build-aux for a subdirectory. We
don't, but it doesn't hurt to update.
* .gnulib: Update, for bootstrap fix.
* bootstrap: Sync to upstream.
* bootstrap.conf: Match upstream bug fix.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the trivial gnulib rule.
* .gnulib da8d59e...644c404 (5):
> bootstrap: use correct source when copying build-aux files
> tmpdir: fix bug in VMS port
> tmpdir: fix typo in previous change
> * lib/tmpdir.c: Simplify code to add slash; no need for a loop.
> tmpdir: port to VMS, to // != /, and to long dirs
.gnulib | 2 +-
bootstrap | 12 ++++++------
bootstrap.conf | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/.gnulib b/.gnulib
index da8d59e..644c404 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit da8d59ee79138b85daee1ad5b22ea12e4fb6ce47
+Subproject commit 644c40496cf7d5a705a73c9dd32b035fcecc2ab1
diff --git a/bootstrap b/bootstrap
index 9c52204..a37fb8a 100755
--- a/bootstrap
+++ b/bootstrap
@@ -256,12 +256,12 @@ esac
# Extra files from gnulib, which override files from other sources.
test -z "${gnulib_extra_files}" && \
gnulib_extra_files="
- $build_aux/install-sh
- $build_aux/mdate-sh
- $build_aux/texinfo.tex
- $build_aux/depcomp
- $build_aux/config.guess
- $build_aux/config.sub
+ build-aux/install-sh
+ build-aux/mdate-sh
+ build-aux/texinfo.tex
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
doc/INSTALL
"
diff --git a/bootstrap.conf b/bootstrap.conf
index 1c59c22..f166a53 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -233,10 +233,10 @@ touch AUTHORS ChangeLog || exit 1
# Override bootstrap's list - we don't use mdate-sh or texinfo.tex.
gnulib_extra_files="
- $build_aux/install-sh
- $build_aux/depcomp
- $build_aux/config.guess
- $build_aux/config.sub
+ build-aux/install-sh
+ build-aux/depcomp
+ build-aux/config.guess
+ build-aux/config.sub
doc/INSTALL
"
--
1.8.3.1
11 years, 4 months
[libvirt] [PATCH v2] autogen: Handle case when libvirt's submodule
by Michal Privoznik
Currently, in the autogen.sh script we check whether .git is an existing
directory in which case bootstrap is run. However, if libvirt is a
submodule, then the .git is just a file (with reference to the topmost
.git directory). However, our submodule routines work well. So there's
no real reason why we should prohibit users to build libvirt from
submodule.
---
diff to v1:
- prefer || over -o
autogen.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autogen.sh b/autogen.sh
index 42e5608..f7c2022 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -64,7 +64,7 @@ bootstrap_hash()
# like to run 'git clean -x -f po' to fix it; but only ./bootstrap regenerates
# the required file po/Makevars.
# Only run bootstrap from a git checkout, never from a tarball.
-if test -d .git; then
+if test -d .git || -f .git; then
curr_status=.git-module-status t=
if test "$no_git"; then
t=no-git
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH] maint: split long lines in Makefiles
by Eric Blake
Makefiles are another easy file to enforce line limits.
Mostly straightforward; interesting tricks worth noting:
src/Makefile.am: $(confdir) was already defined, use it in more places
tests/Makefile.am: path_add and VG required some interesting compression
* cfg.mk (sc_prohibit_long_lines): Add another test.
* Makefile.am:Fix offenders.
* daemon/Makefile.am: Likewise.
* docs/Makefile.am: Likewise.
* python/Makefile.am: Likewise.
* src/Makefile.am: Likewise.
* tests/Makefile.am: Likewise.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Should be no change in behavior, but needs a review :)
Makefile.am | 9 +++++---
cfg.mk | 4 ++++
daemon/Makefile.am | 21 ++++++++++++------
docs/Makefile.am | 15 +++++++++----
python/Makefile.am | 18 ++++++++++------
src/Makefile.am | 63 +++++++++++++++++++++++++++++++++---------------------
tests/Makefile.am | 25 +++++++++++++++-------
7 files changed, 103 insertions(+), 52 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f620c72..4e24ecf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,10 +55,13 @@ NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html.in
| perl -pe 's/[ \t]+$$//' \
> $@-t && mv $@-t $@ ; fi
-$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hacking2.xsl \
- $(top_srcdir)/docs/wrapstring.xsl $(top_srcdir)/docs/hacking.html.in
+$(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl \
+ $(top_srcdir)/docs/hacking2.xsl \
+ $(top_srcdir)/docs/wrapstring.xsl \
+ $(top_srcdir)/docs/hacking.html.in
$(AM_V_GEN)if [ -x $(XSLTPROC) ] ; then \
- $(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hacking.html.in | \
+ $(XSLTPROC) --nonet $(top_srcdir)/docs/hacking1.xsl \
+ $(top_srcdir)/docs/hacking.html.in | \
$(XSLTPROC) --nonet $(top_srcdir)/docs/hacking2.xsl - \
| perl -0777 -pe 's/\n\n+$$/\n/' \
> $@-t && mv $@-t $@ ; fi;
diff --git a/cfg.mk b/cfg.mk
index aae1d0e..13de268 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -694,6 +694,10 @@ sc_prohibit_long_lines:
in_vc_files='\.arg[sv]' \
halt='Wrap long lines in expected output files' \
$(_sc_search_regexp)
+ @prohibit='.{80}' \
+ in_vc_files='Makefile\.am' \
+ halt='Wrap long lines in Makefiles' \
+ $(_sc_search_regexp)
sc_copyright_format:
@require='Copyright .*Red 'Hat', Inc\.' \
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index e8a8371..ad7544c 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -217,14 +217,16 @@ libvirtd.policy: libvirtd.policy.in $(top_builddir)/config.status
mv $@-t $@
BUILT_SOURCES += libvirtd.policy
-install-data-local: install-init-redhat install-init-systemd install-init-upstart \
+install-data-local: install-init-redhat install-init-systemd \
+ install-init-upstart \
install-data-sasl install-data-polkit \
install-logrotate install-sysctl
$(MKDIR_P) $(DESTDIR)$(localstatedir)/log/libvirt \
$(DESTDIR)$(localstatedir)/run/libvirt \
$(DESTDIR)$(localstatedir)/lib/libvirt
-uninstall-local:: uninstall-init-redhat uninstall-init-systemd uninstall-init-upstart \
+uninstall-local:: uninstall-init-redhat uninstall-init-systemd \
+ uninstall-init-upstart \
uninstall-data-sasl uninstall-data-polkit \
uninstall-logrotate uninstall-sysctl
rmdir $(DESTDIR)$(localstatedir)/log/libvirt || :
@@ -280,10 +282,14 @@ install-logrotate: $(LOGROTATE_CONFS)
$(DESTDIR)$(localstatedir)/log/libvirt/lxc/ \
$(DESTDIR)$(localstatedir)/log/libvirt/uml/ \
$(DESTDIR)$(sysconfdir)/logrotate.d/
- $(INSTALL_DATA) libvirtd.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
- $(INSTALL_DATA) libvirtd.qemu.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
- $(INSTALL_DATA) libvirtd.lxc.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
- $(INSTALL_DATA) libvirtd.uml.logrotate $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
+ $(INSTALL_DATA) libvirtd.logrotate \
+ $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd
+ $(INSTALL_DATA) libvirtd.qemu.logrotate \
+ $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.qemu
+ $(INSTALL_DATA) libvirtd.lxc.logrotate \
+ $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.lxc
+ $(INSTALL_DATA) libvirtd.uml.logrotate \
+ $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd.uml
uninstall-logrotate:
rm -f $(DESTDIR)$(sysconfdir)/logrotate.d/libvirtd \
@@ -423,7 +429,8 @@ $(srcdir)/libvirtd.8.in: libvirtd.pod.in $(top_srcdir)/configure.ac
if WITH_SASL
install-data-sasl:
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sasl2/
- $(INSTALL_DATA) $(srcdir)/libvirtd.sasl $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
+ $(INSTALL_DATA) $(srcdir)/libvirtd.sasl \
+ $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
uninstall-data-sasl:
rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
diff --git a/docs/Makefile.am b/docs/Makefile.am
index f453c4c..aabee44 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -162,17 +162,23 @@ todo.html.in: todo.pl
|| { rm $@ && exit 1; }; \
else \
echo "Stubbing $@"; \
- echo "<html xmlns=\"http://www.w3.org/1999/xhtml\"><body><h1>Todo list unavailable: no config file</h1></body></html>" > $@ ; \
+ printf "%s\n" \
+ "<html xmlns=\"http://www.w3.org/1999/xhtml\">" \
+ "<body>" \
+ "<h1>Todo list unavailable: no config file</h1>" \
+ "</body></html>" > $@ ; \
fi
todo:
rm -f todo.html.in
$(MAKE) todo.html
-hvsupport.html.in: $(srcdir)/hvsupport.pl $(srcdir)/../src/libvirt_public.syms \
+hvsupport.html.in: $(srcdir)/hvsupport.pl \
+ $(srcdir)/../src/libvirt_public.syms \
$(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
$(srcdir)/../src/driver.h
- $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ || { rm $@ && exit 1; }
+ $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ \
+ || { rm $@ && exit 1; }
.PHONY: todo
@@ -277,7 +283,8 @@ clean-local:
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt *.html
maintainer-clean-local: clean-local
- rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml todo.html.in hvsupport.html.in
+ rm -rf $(srcdir)/libvirt-api.xml $(srcdir)/libvirt-refs.xml \
+ todo.html.in hvsupport.html.in
rm -rf $(srcdir)/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-refs.xml
rm -rf $(srcdir)/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-refs.xml
rm -rf $(APIBUILD_STAMP)
diff --git a/python/Makefile.am b/python/Makefile.am
index b3e858f..9e957d1 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -78,7 +78,8 @@ nodist_libvirtmod_la_SOURCES = libvirt.c libvirt.h
# need extra flags here
libvirtmod_la_CFLAGS = $(WARN_CFLAGS) $(WARN_PYTHON_CFLAGS)
-libvirtmod_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
+libvirtmod_la_LDFLAGS = -module -avoid-version -shared \
+ -L$(top_builddir)/src/.libs \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_la_LIBADD = $(mylibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
@@ -89,7 +90,8 @@ nodist_libvirtmod_qemu_la_SOURCES = libvirt-qemu.c libvirt-qemu.h
# need extra flags here
libvirtmod_qemu_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
-libvirtmod_qemu_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
+libvirtmod_qemu_la_LDFLAGS = -module -avoid-version -shared \
+ -L$(top_builddir)/src/.libs \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_qemu_la_LIBADD = $(myqemulibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
@@ -100,25 +102,29 @@ nodist_libvirtmod_lxc_la_SOURCES = libvirt-lxc.c libvirt-lxc.h
# need extra flags here
libvirtmod_lxc_la_CFLAGS = $(WARN_PYTHON_CFLAGS)
-libvirtmod_lxc_la_LDFLAGS = -module -avoid-version -shared -L$(top_builddir)/src/.libs \
+libvirtmod_lxc_la_LDFLAGS = -module -avoid-version -shared \
+ -L$(top_builddir)/src/.libs \
$(CYGWIN_EXTRA_LDFLAGS)
libvirtmod_lxc_la_LIBADD = $(mylxclibs) \
$(CYGWIN_EXTRA_LIBADD) $(CYGWIN_EXTRA_PYTHON_LIBADD)
GENERATE = generator.py
-API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-override-api.xml
+API_DESC = $(top_srcdir)/docs/libvirt-api.xml \
+ $(srcdir)/libvirt-override-api.xml
GENERATED= libvirt-export.c \
libvirt.c \
libvirt.h \
libvirt.py
-QEMU_API_DESC = $(top_srcdir)/docs/libvirt-qemu-api.xml $(srcdir)/libvirt-qemu-override-api.xml
+QEMU_API_DESC = $(top_srcdir)/docs/libvirt-qemu-api.xml \
+ $(srcdir)/libvirt-qemu-override-api.xml
QEMU_GENERATED= libvirt-qemu-export.c \
libvirt-qemu.c \
libvirt-qemu.h \
libvirt_qemu.py
-LXC_API_DESC = $(top_srcdir)/docs/libvirt-lxc-api.xml $(srcdir)/libvirt-lxc-override-api.xml
+LXC_API_DESC = $(top_srcdir)/docs/libvirt-lxc-api.xml \
+ $(srcdir)/libvirt-lxc-override-api.xml
LXC_GENERATED= libvirt-lxc-export.c \
libvirt-lxc.c \
libvirt-lxc.h \
diff --git a/src/Makefile.am b/src/Makefile.am
index d9e703f..e3e8e70 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -153,7 +153,8 @@ BUILT_SOURCES += $(srcdir)/util/virkeymaps.h
$(srcdir)/util/virkeymaps.h: $(srcdir)/util/keymaps.csv \
$(srcdir)/util/virkeycode-mapgen.py
- $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py <$(srcdir)/util/keymaps.csv >$@
+ $(AM_V_GEN)$(PYTHON) $(srcdir)/util/virkeycode-mapgen.py \
+ <$(srcdir)/util/keymaps.csv >$@
EXTRA_DIST += util/virthreadpthread.c util/virthreadwin32.c
@@ -1217,7 +1218,8 @@ $(HYPERV_DRIVER_GENERATED): $(HYPERV_GENERATED_STAMP)
$(HYPERV_GENERATED_STAMP): $(srcdir)/hyperv/hyperv_wmi_generator.input \
$(srcdir)/hyperv/hyperv_wmi_generator.py
- $(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(srcdir)/hyperv/hyperv_wmi_generator.py \
+ $(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) \
+ $(srcdir)/hyperv/hyperv_wmi_generator.py \
&& touch $@
MAINTAINERCLEANFILES += $(HYPERV_DRIVER_GENERATED) $(HYPERV_GENERATED_STAMP)
@@ -1246,7 +1248,10 @@ libvirt_driver_network_la_SOURCES =
libvirt_driver_network_la_LIBADD = libvirt_driver_network_impl.la
if WITH_DRIVER_MODULES
mod_LTLIBRARIES += libvirt_driver_network.la
-libvirt_driver_network_la_LIBADD += ../gnulib/lib/libgnu.la $(LIBNL_LIBS) $(DBUS_LIBS)
+libvirt_driver_network_la_LIBADD += ../gnulib/lib/libgnu.la \
+ $(LIBNL_LIBS) \
+ $(DBUS_LIBS) \
+ $(NULL)
libvirt_driver_network_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
else
noinst_LTLIBRARIES += libvirt_driver_network.la
@@ -1454,7 +1459,8 @@ libvirt_security_manager_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES)
libvirt_security_manager_la_CFLAGS += $(APPARMOR_CFLAGS)
endif
-libvirt_driver_access_la_SOURCES = $(ACCESS_DRIVER_SOURCES) $(ACCESS_DRIVER_GENERATED)
+libvirt_driver_access_la_SOURCES = \
+ $(ACCESS_DRIVER_SOURCES) $(ACCESS_DRIVER_GENERATED)
noinst_LTLIBRARIES += libvirt_driver_access.la
libvirt_la_BUILT_LIBADD += libvirt_driver_access.la
libvirt_driver_access_la_CFLAGS = \
@@ -1574,7 +1580,8 @@ check-local: check-augeas
check-augeas-lockd \
$(NULL)
-check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock check-augeas-lockd
+check-augeas: check-augeas-qemu check-augeas-lxc check-augeas-sanlock \
+ check-augeas-lockd
AUG_GENTEST = $(PERL) $(top_srcdir)/build-aux/augeas-gentest.pl
EXTRA_DIST += $(top_srcdir)/build-aux/augeas-gentest.pl
@@ -1721,7 +1728,8 @@ EXTRA_DIST += \
BUILT_SOURCES += $(GENERATED_SYM_FILES)
-libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) \
+libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) \
+ $(ACCESS_DRIVER_SYM_FILES) \
$(top_builddir)/config.status
$(AM_V_GEN)rm -f $@-tmp $@ ; \
printf '# WARNING: generated from the following:\n# $^\n\n' >$@-tmp && \
@@ -1737,21 +1745,24 @@ libvirt.syms: libvirt_public.syms $(USED_SYM_FILES) $(ACCESS_DRIVER_SYM_FILES) \
libvirt.def: libvirt.syms
$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
printf 'EXPORTS\n' > $@-tmp && \
- sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d; s/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
+ sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d' \
+ -e 's/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
chmod a-w $@-tmp && \
mv $@-tmp libvirt.def
libvirt_qemu.def: $(srcdir)/libvirt_qemu.syms
$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
printf 'EXPORTS\n' > $@-tmp && \
- sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d; s/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
+ sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d' \
+ -e 's/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
chmod a-w $@-tmp && \
mv $@-tmp libvirt_qemu.def
libvirt_lxc.def: $(srcdir)/libvirt_lxc.syms
$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
printf 'EXPORTS\n' > $@-tmp && \
- sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d; s/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
+ sed -e '/^$$/d; /#/d; /:/d; /}/d; /\*/d; /LIBVIRT_/d' \
+ -e 's/[ ]*\(.*\)\;/ \1/g' $^ >> $@-tmp && \
chmod a-w $@-tmp && \
mv $@-tmp libvirt_lxc.def
@@ -1827,7 +1838,8 @@ RPC_PROBE_FILES = $(srcdir)/rpc/virnetprotocol.x \
libvirt_functions.stp: $(RPC_PROBE_FILES) $(srcdir)/rpc/gensystemtap.pl
$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gensystemtap.pl $(RPC_PROBE_FILES) > $@
-%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl $(top_builddir)/config.status
+%_probes.stp: %_probes.d $(srcdir)/dtrace2systemtap.pl \
+ $(top_builddir)/config.status
$(AM_V_GEN)$(PERL) -w $(srcdir)/dtrace2systemtap.pl \
$(DTRACE2SYSTEMTAP_FLAGS) $(bindir) $(sbindir) $(libdir) $< > $@
@@ -1877,7 +1889,10 @@ lockd_la_CFLAGS = -I$(top_srcdir)/src/conf \
$(XDR_CFLAGS) \
$(AM_CFLAGS)
lockd_la_LDFLAGS = -module -avoid-version
-lockd_la_LIBADD = ../gnulib/lib/libgnu.la libvirt-net-rpc.la libvirt-net-rpc-client.la
+lockd_la_LIBADD = ../gnulib/lib/libgnu.la \
+ libvirt-net-rpc.la \
+ libvirt-net-rpc-client.la \
+ $(NULL)
augeas_DATA += locking/libvirt_lockd.aug
augeastest_DATA += test_libvirt_lockd.aug
CLEANFILES += test_libvirt_lockd.aug
@@ -2332,19 +2347,19 @@ if WITH_NETWORK
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/network"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/lib/libvirt/dnsmasq"
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run/libvirt/network"
- $(MKDIR_P) "$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart"
+ $(MKDIR_P) "$(DESTDIR)$(confdir)/qemu/networks/autostart"
$(INSTALL_DATA) $(srcdir)/network/default.xml \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
+ $(DESTDIR)$(confdir)/qemu/networks/default.xml
test -z "$(UUID)" || \
{ sed -e "s,</name>,</name>\n <uuid>$(UUID)</uuid>," \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml > \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t && \
- cp $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml && \
- rm $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml.t; }
- test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
+ $(DESTDIR)$(confdir)/qemu/networks/default.xml > \
+ $(DESTDIR)$(confdir)/qemu/networks/default.xml.t && \
+ cp $(DESTDIR)$(confdir)/qemu/networks/default.xml.t \
+ $(DESTDIR)$(confdir)/qemu/networks/default.xml && \
+ rm $(DESTDIR)$(confdir)/qemu/networks/default.xml.t; }
+ test -e $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml || \
ln -s ../default.xml \
- $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
+ $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
endif
uninstall-local:: uninstall-init uninstall-systemd
@@ -2383,10 +2398,10 @@ if WITH_XEN
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/xen" ||:
endif
if WITH_NETWORK
- rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
- rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
- rmdir "$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart" || :
- rmdir "$(DESTDIR)$(sysconfdir)/libvirt/qemu/networks" || :
+ rm -f $(DESTDIR)$(confdir)/qemu/networks/autostart/default.xml
+ rm -f $(DESTDIR)$(confdir)/qemu/networks/default.xml
+ rmdir "$(DESTDIR)$(confdir)/qemu/networks/autostart" || :
+ rmdir "$(DESTDIR)$(confdir)/qemu/networks" || :
rmdir "$(DESTDIR)$(localstatedir)/lib/libvirt/network" ||:
rmdir "$(DESTDIR)$(localstatedir)/run/libvirt/network" ||:
endif
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4c49151..47926b1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -294,7 +294,8 @@ TESTS = $(test_programs) \
# intermediate shell variable, but must do all the expansion in make
lv_abs_top_builddir=`cd '$(top_builddir)'; pwd`
-path_add = $(lv_abs_top_builddir)/daemon$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tools$(PATH_SEPARATOR)$(lv_abs_top_builddir)/tests
+path_add = $(subst :,$(PATH_SEPARATOR),\
+ $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests))
TESTS_ENVIRONMENT = \
abs_top_builddir=$(lv_abs_top_builddir) \
@@ -310,8 +311,10 @@ TESTS_ENVIRONMENT = \
$(VG)
+VALGRIND = valgrind --quiet --leak-check=full \
+ --suppressions=$(srcdir)/.valgrind.supp
valgrind:
- $(MAKE) check VG="libtool --mode=execute valgrind --quiet --leak-check=full --suppressions=$(srcdir)/.valgrind.supp"
+ $(MAKE) check VG="libtool --mode=execute $(VALGRIND)"
sockettest_SOURCES = \
sockettest.c \
@@ -669,7 +672,8 @@ libsecurityselinuxhelper_la_LDFLAGS = -module -avoid-version \
securityselinuxtest_SOURCES = \
securityselinuxtest.c testutils.h testutils.c
securityselinuxtest_LDADD = $(LDADDS)
-securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la
+securityselinuxtest_DEPENDENCIES = libsecurityselinuxhelper.la \
+ ../src/libvirt.la
if WITH_QEMU
if WITH_ATTR
@@ -677,11 +681,13 @@ securityselinuxlabeltest_SOURCES = \
securityselinuxlabeltest.c testutils.h testutils.c \
testutilsqemu.h testutilsqemu.c
securityselinuxlabeltest_LDADD = $(qemu_LDADDS)
-securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la ../src/libvirt.la
+securityselinuxlabeltest_DEPENDENCIES = libsecurityselinuxhelper.la \
+ ../src/libvirt.la
endif
endif
endif
-EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c securityselinuxhelper.c
+EXTRA_DIST += securityselinuxtest.c securityselinuxlabeltest.c \
+ securityselinuxhelper.c
virbuftest_SOURCES = \
virbuftest.c testutils.h testutils.c
@@ -725,7 +731,8 @@ endif
libshunload_la_SOURCES = shunloadhelper.c
libshunload_la_LIBADD = ../src/libvirt.la
-libshunload_la_LDFLAGS = -module -avoid-version -rpath /evil/libtool/hack/to/force/shared/lib/creation
+libshunload_la_LDFLAGS = -module -avoid-version \
+ -rpath /evil/libtool/hack/to/force/shared/lib/creation
shunloadtest_SOURCES = \
shunloadtest.c
@@ -756,7 +763,8 @@ object_locking_SOURCES = object-locking.ml
ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) -c $<
object-locking: object-locking.cmx object-locking-files.txt
- ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) $(CILOPTLIBS) $< -o $@
+ ocamlfind ocamlopt $(CILOPTFLAGS) $(CILOPTINCS) $(CILOPTPACKAGES) \
+ $(CILOPTLIBS) $< -o $@
object-locking-files.txt:
find $(top_builddir)/src/ -name '*.i' > $@
@@ -765,4 +773,5 @@ else
EXTRA_DIST += object-locking.ml
endif
-CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx object-locking-files.txt
+CLEANFILES = *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.cmi *.cmx \
+ object-locking-files.txt
--
1.8.3.1
11 years, 4 months
[libvirt] iscsi target name including colon
by Libaiqing
Hi,
I am testing the soft iscsi.
Using targetcli,I emulate an iscsi target from a file.
o- iscsi ............................................................................................................ [Targets: 1]
| o- iqn.2003-01.org.linux-iscsi.fedora121.x8664:sn.712a3704dac7 ....................................................... [TPGs: 1]
| o- tpg1 ............................................................................................................ [enabled]
| o- acls .......................................................................................................... [ACLs: 0]
| o- luns .......................................................................................................... [LUNs: 1]
| | o- lun0 ............................................................................ [fileio/r1 (/home/fedora18_wolv.img)]
| o- portals .................................................................................................... [Portals: 1]
| o- 186.100.8.121:3262 ............................................................................................... [OK]
Then start a vm with the following config.
<disk type='network' device='lun'>
<driver name='qemu' type='raw'/>
<source protocol='iscsi' name='iqn.2003-01.org.linux-iscsi.fedora121.x8664:sn.712a3704dac7'>
<host name='186.100.8.121' port='3262'/>
</source>
<target dev='vda' bus='virtio'/>
</disk>
Then qemu reports an error:
process exited while connecting to monitor: qemu-kvm: -drive file=iscsi://186.100.8.121:3262/iqn.2003-01.org.linux-iscsi.fedora121.x8664%3Asn.712a3704dac7,if=none,id=drive-virtio-disk0,format=raw: Failed to parse URL : iscsi://186.100.8.121:3262/iqn.2003-01.org.linux-iscsi.fedora121.x8664%3Asn.712a3704dac7
qemu-kvm: -drive file=iscsi://186.100.8.121:3262/iqn.2003-01.org.linux-iscsi.fedora121.x8664%3Asn.712a3704dac7,if=none,id=drive-virtio-disk0,format=raw: could not open disk image iscsi://186.100.8.121:3262/iqn.2003-01.org.linux-iscsi.fedora121.x8664%3Asn.712a3704dac7: Invalid argument
The rootcause is the colon in iscsi target name iqn.2003-01.org.linux-iscsi.fedora121.x8664:sn.712a3704dac7 passed to qemu as %3A by libvirt.
Is this an issue?
Could you give me some advise to debug this problem ? I can provide more information if need.
Regards,
baiqing
11 years, 4 months
[libvirt] [PATCH] autogen: Handle case when libvirt's submodule
by Michal Privoznik
Currently, in the autogen.sh script we check whether .git is an existing
directory in which case bootstrap is run. However, if libvirt is a
submodule, then the .git is just a file (with reference to the topmost
.git directory). However, our submodule routines work well. So there's
no real reason why we should prohibit users to build libvirt from
submodule.
---
autogen.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autogen.sh b/autogen.sh
index 42e5608..bfaa058 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -64,7 +64,7 @@ bootstrap_hash()
# like to run 'git clean -x -f po' to fix it; but only ./bootstrap regenerates
# the required file po/Makevars.
# Only run bootstrap from a git checkout, never from a tarball.
-if test -d .git; then
+if test -d .git -o -f .git; then
curr_status=.git-module-status t=
if test "$no_git"; then
t=no-git
--
1.8.1.5
11 years, 4 months
[libvirt] [PATCH v2 0/7] Support to use iscsi storage in domain conf
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=957295
This is an update of Osier's original patch:
https://www.redhat.com/archives/libvir-list/2013-June/msg00673.html
I initialially reviewed the patches, but now own the case since Osier
is still temporarily out.
Changes in v2:
* Patch 1 - no change
* Update patch 2 to add the missing test and clean up text as I noted
* Split patch 3 into two parts
Part A: Just the creation of virDomainDiskSourceIsBlockType()
- Fixed the code to handle my code review comment regarding checking
srcpool too early (before BLOCK) and fix grammar issues noted
Part B: Adding 'pooltype' and adjusting qemuTranslateDiskSourcePool()
in order to handle the "mode='uri'" so that when the disk is added
via qemu_command the data is available for add the disk as ISCSI
* Patch 5 (previously patch 4) dealt with changes to security backends;
however, I found that those were unnecessary since according to the
docs in formatdomain.html in the devices section "(NB, for "volume"
type disk, seclabel is only valid when the specified storage volume
is of 'file' or 'block' type)."
However, since Dan requested to have some tests added for network and
volume disk types to the securityselinuxlabeltest, I took the liberty
to add those even though the net result is they don't add labels which
I guess is an appropriate check - that is that no label is added.
NOTE: I tried to figure out a way to add a 'file' storage pool that
labels could be attached to, but was unsuccessful.
* Patch 6 & 7 (formerly 5 & 6) - no change. Now that I know more about
the code the issue I had with 6 is a no-op
John Ferlan (3):
conf: Introduce virDomainDiskSourceIsBlockType
qemu: Translate the iscsi pool/volume disk source
tests: Add various network and volume definitions
Osier Yang (4):
storage_iscsi: Reflect the default target port
conf: Introduce new XML tag "mode" for disk source
conf: Ignore the volume type disk if its mode is "uri"
qemu: Translate the volume type disk source before cgroup setting
docs/formatdomain.html.in | 9 +-
docs/schemas/domaincommon.rng | 8 ++
src/conf/domain_conf.c | 68 +++++++++++-
src/conf/domain_conf.h | 26 +++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 20 +++-
src/qemu/qemu_conf.c | 117 +++++++++++++++++----
src/qemu/qemu_process.c | 13 ++-
src/storage/storage_backend_iscsi.c | 6 +-
.../qemuxml2argv-disk-source-pool-mode.xml | 48 +++++++++
tests/qemuxml2xmltest.c | 1 +
tests/securityselinuxlabeldata/netdisks.txt | 5 +
tests/securityselinuxlabeldata/netdisks.xml | 58 ++++++++++
tests/securityselinuxlabeldata/voldisks.txt | 5 +
tests/securityselinuxlabeldata/voldisks.xml | 45 ++++++++
tests/securityselinuxlabeltest.c | 2 +
16 files changed, 400 insertions(+), 32 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool-mode.xml
create mode 100644 tests/securityselinuxlabeldata/netdisks.txt
create mode 100644 tests/securityselinuxlabeldata/netdisks.xml
create mode 100644 tests/securityselinuxlabeldata/voldisks.txt
create mode 100644 tests/securityselinuxlabeldata/voldisks.xml
--
1.8.1.4
11 years, 4 months