Re: [libvirt] [PATCH] docs: Drop unused rule for internals/%.html.tmp target
On Thu, Aug 20, 2015 at 03:12:36AM +0200, Michal Privoznik wrote: On 19.08.2015 14:40, Guido Günther wrote: We're using the %.html.tmp for all html files now so drop the unused one and rather make sure the needed directory exists. This fixes build failures as described in https://www.redhat.com/archives/libvir-list/2015-August/msg00603.html --- configure.ac | 1 + docs/Makefile.am | 9 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 9066ed6..749dbb7 100644 --- a/configure.ac +++ b/configure.ac @@ -2774,6 +2774,7 @@ AC_DEFINE_UNQUOTED([isbase64],[libvirt_gl_isbase64],[Hack to avoid symbol clash] AC_DEFINE_UNQUOTED([base64_encode],[libvirt_gl_base64_encode],[Hack to avoid symbol clash]) AC_DEFINE_UNQUOTED([base64_encode_alloc],[libvirt_gl_base64_encode_alloc],[Hack to avoid symbol clash]) +AC_CONFIG_COMMANDS([mkdir], [$MKDIR_P docs/internals]) AC_CONFIG_FILES([run], [chmod +x,-w run]) AC_CONFIG_FILES([\ diff --git a/docs/Makefile.am b/docs/Makefile.am index daf37b6..563baca 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -218,15 +218,6 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ %.png: %.fig convert -rotate 90 $ $@ -internals/%.html.tmp: internals/%.html.in subsite.xsl page.xsl sitemap.html.in - @if [ -x $(XSLTPROC) ] ; then \ - echo Generating $@; \ - $(MKDIR_P) internals; \ - name=`echo $@ | sed -e 's/.tmp//'`; \ - $(XSLTPROC) --stringparam pagename $$name --nonet \ - $(top_srcdir)/docs/subsite.xsl $ $@ \ - || { rm $@ exit 1; }; fi - %.html.tmp: %.html.in site.xsl page.xsl sitemap.html.in $(acl_generated) @if [ -x $(XSLTPROC) ] ; then \ echo Generating $@; \ ACK Pushed. Thanks, -- Guido -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] util: fix build without cgroup
Commit 89c509a0 added getters for cgroup block device I/O throttling, however stub versions of these functions have not matching function prototypes that result in compilation fail on platforms not supporting cgroup. Fix build by correcting prototypes of the stubbed functions. Pushing under build-breaker rule. --- src/util/vircgroup.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index c94512a..0379c2e 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -4427,8 +4427,7 @@ virCgroupSetBlkioDeviceWriteBps(virCgroupPtr group ATTRIBUTE_UNUSED, int virCgroupGetBlkioDeviceWeight(virCgroupPtr group ATTRIBUTE_UNUSED, const char *path ATTRIBUTE_UNUSED, - const char *dev_str ATTRIBUTE_UNUSED, - unsigned int weight ATTRIBUTE_UNUSED) + unsigned int *weight ATTRIBUTE_UNUSED) { virReportSystemError(ENOSYS, %s, _(Control groups not supported on this platform)); @@ -4438,8 +4437,7 @@ virCgroupGetBlkioDeviceWeight(virCgroupPtr group ATTRIBUTE_UNUSED, int virCgroupGetBlkioDeviceReadIops(virCgroupPtr group ATTRIBUTE_UNUSED, const char *path ATTRIBUTE_UNUSED, -const char *dev_str ATTRIBUTE_UNUSED, -unsigned int riops ATTRIBUTE_UNUSED) +unsigned int *riops ATTRIBUTE_UNUSED) { virReportSystemError(ENOSYS, %s, _(Control groups not supported on this platform)); @@ -4449,8 +4447,7 @@ virCgroupGetBlkioDeviceReadIops(virCgroupPtr group ATTRIBUTE_UNUSED, int virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group ATTRIBUTE_UNUSED, const char *path ATTRIBUTE_UNUSED, - const char *dev_str ATTRIBUTE_UNUSED, - unsigned int wiops ATTRIBUTE_UNUSED) + unsigned int *wiops ATTRIBUTE_UNUSED) { virReportSystemError(ENOSYS, %s, _(Control groups not supported on this platform)); @@ -4460,8 +4457,7 @@ virCgroupGetBlkioDeviceWriteIops(virCgroupPtr group ATTRIBUTE_UNUSED, int virCgroupGetBlkioDeviceReadBps(virCgroupPtr group ATTRIBUTE_UNUSED, const char *path ATTRIBUTE_UNUSED, - const char *dev_str ATTRIBUTE_UNUSED, - unsigned long long rbps ATTRIBUTE_UNUSED) + unsigned long long *rbps ATTRIBUTE_UNUSED) { virReportSystemError(ENOSYS, %s, _(Control groups not supported on this platform)); @@ -4471,8 +4467,7 @@ virCgroupGetBlkioDeviceReadBps(virCgroupPtr group ATTRIBUTE_UNUSED, int virCgroupGetBlkioDeviceWriteBps(virCgroupPtr group ATTRIBUTE_UNUSED, const char *path ATTRIBUTE_UNUSED, -const char *dev_str ATTRIBUTE_UNUSED, -unsigned long long wbps ATTRIBUTE_UNUSED) +unsigned long long *wbps ATTRIBUTE_UNUSED) { virReportSystemError(ENOSYS, %s, _(Control groups not supported on this platform)); -- 2.4.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 2/2] libvirt-admin: Generate symbols file
On Thu, Aug 20, 2015 at 02:46:18AM +0200, Michal Privoznik wrote: On 19.08.2015 14:39, Guido Günther wrote: Since we're linking this into libvirtd we need some symbols to be public but not part of the public API so mark them as LIBVIRT_ADMIN_PRIVATE_VERSION as we do with libvirt. Making all other symbols local makes sure we don't accidentally leak unwanted ones. --- configure.ac | 2 +- src/Makefile.am| 20 ++-- src/libvirt_admin.syms | 18 -- src/libvirt_admin_private.syms | 14 ++ src/libvirt_admin_public.syms | 18 ++ 5 files changed, 51 insertions(+), 21 deletions(-) delete mode 100644 src/libvirt_admin.syms create mode 100644 src/libvirt_admin_private.syms create mode 100644 src/libvirt_admin_public.syms Cool! ACK to both. Thanks for solving that. Pushed. Thanks, -- Guido -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] libvirt 1.2.16 unable to set link state for ethernet network type
I can't set link state for network=ethernet, in older versions all works fine. As i see in qemu_hotplug.c: case VIR_DOMAIN_NET_TYPE_ETHERNET: if (STRNEQ_NULLABLE(olddev-data.ethernet.dev, newdev-data.ethernet.dev) || olddev-nips == 0 || newdev-nips == 0 || !virSocketAddrEqual(olddev-ips[0]-address, newdev-ips[0]-address)) { needReconnect = true; } break; If needReconnect = true, than i get error in libvirt like Operation not supported: unable to change config on 'ethernet' network type In my case, i don't change device name and i don't have ip addresses in xml definition. Whats wrong ? Thanks for help. -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] Add generated libvirt_admin.syms into .gitignore
Commit a2c5d16a70a6161449c687be74db2813b362cf5e switched to generating libvirt_admin.syms, but forgot to add the generated file into .gitignore, hence causing tree pollution post-build. Signed-off-by: Martin Kletzander mklet...@redhat.com --- Pushed as trivial .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0b40f4aac110..6bd41be9db89 100644 --- a/.gitignore +++ b/.gitignore @@ -124,6 +124,7 @@ /src/libvirt_access_lxc.xml /src/libvirt_access_qemu.syms /src/libvirt_access_qemu.xml +/src/libvirt_admin.syms /src/libvirt_*.stp /src/libvirt_*helper /src/libvirt_*probes.h -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] virt-aa-helper: add NVRAM store file for read/write
Some UEFI firmwares may want to use a non-volatile memory to store some variables. If AppArmor is enabled, and NVRAM store file is set currently virt-aa-helper does not add the NVRAM store file to the template. Add this file for read/write when this functionality is defined in domain XML. Signed-off-by: Peter Kieser pe...@kieser.ca --- src/security/virt-aa-helper.c | 4 1 file changed, 4 insertions(+) diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 4ce1e7a..2f93172 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1047,6 +1047,10 @@ get_files(vahControl * ctl) if (vah_add_file(buf, ctl-def-os.loader-path, r) != 0) goto cleanup; +if (ctl-def-os.loader ctl-def-os.loader-nvram) +if (vah_add_file(buf, ctl-def-os.loader-nvram, rw) != 0) +goto cleanup; + for (i = 0; i ctl-def-ngraphics; i++) { if (ctl-def-graphics[i]-type == VIR_DOMAIN_GRAPHICS_TYPE_VNC ctl-def-graphics[i]-data.vnc.socket smime.p7s Description: S/MIME Cryptographic Signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v4] lxc: Inherit namespace feature
This patch adds feature for lxc containers to inherit namespaces. This is very similar to what lxc-tools or docker provides. Look for man lxc-start and you will find that you can pass command args as [ --share-[net|ipc|uts] name|pid ]. Or check out docker networking option in which you can give --net=container:NAME_or_ID as an option for sharing +namespace. From this patch you can add extra libvirt option to share namespace in following way. lxc:namespace lxc:sharenet type='netns' value='red'/ lxc:shareipc type='pid' value='12345'/ lxc:shareuts type='name' value='container1'/ /lxc:namespace The netns option is specific to sharenet. It can be used to inherit from existing network namespace. --- docs/drvlxc.html.in | 21 + docs/schemas/domaincommon.rng | 42 + po/POTFILES.in| 1 + src/Makefile.am | 7 +- src/lxc/lxc_conf.c| 2 +- src/lxc/lxc_container.c | 71 +-- src/lxc/lxc_container.h | 2 + src/lxc/lxc_controller.c | 57 +++- src/lxc/lxc_domain.c | 149 src/lxc/lxc_domain.h | 26 ++ src/lxc/lxc_process.c | 157 ++ tests/lxcxml2xmldata/lxc-sharenet.xml | 33 +++ tests/lxcxml2xmltest.c| 1 + 13 files changed, 560 insertions(+), 9 deletions(-) create mode 100644 tests/lxcxml2xmldata/lxc-sharenet.xml diff --git a/docs/drvlxc.html.in b/docs/drvlxc.html.in index a094bd9..d6c57c4 100644 --- a/docs/drvlxc.html.in +++ b/docs/drvlxc.html.in @@ -590,6 +590,27 @@ Note that allowing capabilities that are normally dropped by default can serious affect the security of the container and the host. /p +h2a name=shareInherit namespaces/a/h2 + +p +Libvirt allows you to inherit the namespace from container/process just like lxc tools +or docker provides to share the network namespace. The following can be used to share +required namespaces. If we want to share only one then the other namespaces can be ignored. +The netns option is specific to sharenet. It can be used in cases we want to use existing network namespace +rather than creating new network namespace for the container. In this case privnet option will be +ignored. +/p +pre +lt;domain type='lxc' xmlns:lxc='http://libvirt.org/schemas/domain/lxc/1.0'gt; +... +lt;lxc:namespacegt; + lt;lxc:sharenet type='netns' value='red'/gt; + lt;lxc:shareuts type='name' value='container1'/gt; + lt;lxc:shareipc type='pid' value='12345'/gt; +lt;/lxc:namespacegt; +lt;/domaingt; +/pre + h2a name=usageContainer usage / management/a/h2 p diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 043c975..fa026cd 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -68,6 +68,9 @@ ref name='qemucmdline'/ /optional optional + ref name='lxcsharens'/ +/optional +optional ref name='keywrap'/ /optional /interleave @@ -5057,6 +5060,45 @@ /element /define + !-- + Optional hypervisor extensions in their own namespace: + LXC +-- + define name=lxcsharens +element name=namespace ns=http://libvirt.org/schemas/domain/lxc/1.0; + zeroOrMore +element name=sharenet + attribute name=type +choice + valuenetns/value + valuename/value + valuepid/value +/choice + /attribute + attribute name='value'/ +/element +element name=shareipc + attribute name=type +choice + valuename/value + valuepid/value +/choice + /attribute + attribute name='value'/ +/element +element name=shareuts + attribute name=type +choice + valuename/value + valuepid/value +/choice + /attribute + attribute name='value'/ +/element + /zeroOrMore +/element + /define + define name=metadata element name=metadata zeroOrMore diff --git a/po/POTFILES.in b/po/POTFILES.in index 1e52e6a..46220f7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -85,6 +85,7 @@ src/lxc/lxc_native.c src/lxc/lxc_container.c src/lxc/lxc_conf.c src/lxc/lxc_controller.c +src/lxc/lxc_domain.c src/lxc/lxc_driver.c src/lxc/lxc_process.c src/libxl/libxl_domain.c diff --git a/src/Makefile.am b/src/Makefile.am index c4d49a5..24d31e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1320,7 +1320,12 @@ libvirt_driver_lxc_impl_la_CFLAGS = \ -I$(srcdir)/access \ -I$(srcdir)/conf \ $(AM_CFLAGS) -libvirt_driver_lxc_impl_la_LIBADD = $(CAPNG_LIBS) $(LIBNL_LIBS) $(FUSE_LIBS) +libvirt_driver_lxc_impl_la_LIBADD =
Re: [libvirt] [PATCH] conf: Check for attach disk usage of iothread=0
On Wed, Aug 12, 2015 at 05:27:48PM -0400, John Ferlan wrote: Since iothreadid = 0 is invalid, we need to check for it when attempting to add a disk; otherwise, someone would think/believe their attempt to add an IOThread to the disk would succeed. Luckily other code ignored things when -iothread == 0... We are very fortunate indeed in this regard. ACK then. Martin Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/domain_conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b743bdd..10630c0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7448,7 +7448,8 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt, } if (driverIOThread) { -if (virStrToLong_uip(driverIOThread, NULL, 10, def-iothread) 0) { +if (virStrToLong_uip(driverIOThread, NULL, 10, def-iothread) 0 || +def-iothread == 0) { virReportError(VIR_ERR_XML_ERROR, _(Invalid iothread attribute in disk driver element: %s), driverIOThread); -- 2.1.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] syntax-check Argument list too long problems
Hi, Not so long ago I've started encountering issues with syntax-check, for example: trailing_blank /bin/sh: grep: Argument list too long When I'm running it with SHELL='sh -x' I can see that it's indeed trying to run grep with really long list of files, e.g.: + grep -nE '\error *\([^]*[^]*[a-z]{3}' .ctags .dir-locals.el ... and many many other files in the list. I see this problem on FreeBSD, but not on Linux, I guess that's because ARG_MAX is much lower on FreeBSD: freebsd$ getconf ARG_MAX 262144 linux$ getconf ARG_MAX 2097152 It looks like it's not possible to change ARG_MAX value on FreeBSD. Do I get it right that it's something that I need to report to gnulib? Roman Bogorodskiy pgpyR0KvZpMT7.pgp Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] syntax-check Argument list too long problems
[adding bug-gnulib] On 08/20/2015 08:30 AM, Roman Bogorodskiy wrote: Hi, Not so long ago I've started encountering issues with syntax-check, for example: trailing_blank /bin/sh: grep: Argument list too long When I'm running it with SHELL='sh -x' I can see that it's indeed trying to run grep with really long list of files, e.g.: + grep -nE '\error *\([^]*[^]*[a-z]{3}' .ctags .dir-locals.el ... and many many other files in the list. I see this problem on FreeBSD, but not on Linux, I guess that's because ARG_MAX is much lower on FreeBSD: freebsd$ getconf ARG_MAX 262144 linux$ getconf ARG_MAX 2097152 It looks like it's not possible to change ARG_MAX value on FreeBSD. Do I get it right that it's something that I need to report to gnulib? Reported. I'm not sure what it would take to work xargs into the mix to allow breaking up the list of files to be checked into manageable chunks. But hopefully all of the syntax checks still work in piecewise fashion. -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] syntax-check Argument list too long problems
On Thu, Aug 20, 2015 at 06:30:12PM +0300, Roman Bogorodskiy wrote: Hi, Not so long ago I've started encountering issues with syntax-check, for example: trailing_blank /bin/sh: grep: Argument list too long When I'm running it with SHELL='sh -x' I can see that it's indeed trying to run grep with really long list of files, e.g.: + grep -nE '\error *\([^]*[^]*[a-z]{3}' .ctags .dir-locals.el ... and many many other files in the list. I see this problem on FreeBSD, but not on Linux, I guess that's because ARG_MAX is much lower on FreeBSD: freebsd$ getconf ARG_MAX 262144 linux$ getconf ARG_MAX 2097152 It looks like it's not possible to change ARG_MAX value on FreeBSD. Do I get it right that it's something that I need to report to gnulib? Roman Bogorodskiy It depends. We have some syntax-check rules that need fixing, but the one you reported seems like it's gnulib's own one. So I'm guessing gnulib should use xargs as well as us for feed the list not to grep only, but anywhere. -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list