Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 12:29:18AM -0400, Jim Paris wrote: Daniel P. Berrange wrote: This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax I still think our consensus from when I posted this patch last year (nic model=...) makes more sense ... but getting any form of this patch upstream sounds good to me. I'm fine with the patch. Concerning this detail of the syntax, we already know at that point that it's about a nic since we are in an interface description, so it's a bit redundant. Also it's the first time we introduce XML to describe a specific model of hardware (so far we managed to avoid this, from a virtualization POV it's more of a problem than a feature in my opinion), the advantage of model type=''/ to me is that we could reuse exactly the same construct each time we want to specify the hardware model of an emulated device, the device type being already defined by the englobing element (disk/input/graphic/serial/...) Since we are introducing new syntax, making it as generic as possible sounds better to me, Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[Libvir] [PATCH] Fix build errors.
* proxy/Makefile.am (libvirt_proxy_LDADD): Add ../gnulib/lib/libgnu.la. * gnulib/lib/arpa_inet.in.h: Add new file from gnulib. Signed-off-by: Jim Meyering [EMAIL PROTECTED] --- ChangeLog |6 +++ gnulib/lib/.cvsignore |1 + gnulib/lib/arpa_inet.in.h | 76 + gnulib/tests/.cvsignore |1 + proxy/Makefile.am |2 +- 5 files changed, 85 insertions(+), 1 deletions(-) create mode 100644 gnulib/lib/arpa_inet.in.h diff --git a/ChangeLog b/ChangeLog index 401a724..3126fc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-29 Jim Meyering [EMAIL PROTECTED] + + Fix build errors. + * proxy/Makefile.am (libvirt_proxy_LDADD): Add ../gnulib/lib/libgnu.la. + * gnulib/lib/arpa_inet.in.h: Add new file from gnulib. + Tue Apr 29 21:43:28 CEST 2008 Jim Meyering [EMAIL PROTECTED] update from gnulib diff --git a/gnulib/lib/.cvsignore b/gnulib/lib/.cvsignore index 315947a..2849ca9 100644 --- a/gnulib/lib/.cvsignore +++ b/gnulib/lib/.cvsignore @@ -11,6 +11,7 @@ netinet_in.h poll.h stdbool.h stdint.h +stdio-impl.h stdio.h stdlib.h string.h diff --git a/gnulib/lib/arpa_inet.in.h b/gnulib/lib/arpa_inet.in.h new file mode 100644 index 000..6d62825 --- /dev/null +++ b/gnulib/lib/arpa_inet.in.h @@ -0,0 +1,76 @@ +/* A GNU-like arpa/inet.h. + + Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +#ifndef _GL_ARPA_INET_H + +/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc + under MinGW. */ +#include sys/socket.h + +#if @HAVE_ARPA_INET_H@ + +/* The include_next requires a split double-inclusion guard. */ +# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@ + +#endif + +#ifndef _GL_ARPA_INET_H +#define _GL_ARPA_INET_H + +#if @GNULIB_INET_NTOP@ +# if [EMAIL PROTECTED]@ +/* Converts an internet address from internal format to a printable, + presentable format. + AF is an internet address family, such as AF_INET or AF_INET6. + SRC points to a 'struct in_addr' (for AF_INET) or 'struct in6_addr' + (for AF_INET6). + DST points to a buffer having room for CNT bytes. + The printable representation of the address (in numeric form, not + surrounded by [...], no reverse DNS is done) is placed in DST, and + DST is returned. If an error occurs, the return value is NULL and + errno is set. If CNT bytes are not sufficient to hold the result, + the return value is NULL and errno is set to ENOSPC. A good value + for CNT is 46. + + For more details, see the POSIX:2001 specification + http://www.opengroup.org/susv3xsh/inet_ntop.html. */ +extern const char *inet_ntop (int af, const void *restrict src, + char *restrict dst, socklen_t cnt); +# endif +#elif defined GNULIB_POSIXCHECK +# undef inet_ntop +# define inet_ntop(af,src,dst,cnt) \ +(GL_LINK_WARNING (inet_ntop is unportable - \ + use gnulib module inet_ntop for portability), \ + inet_ntop (af, src, dst, cnt)) +#endif + +#if @GNULIB_INET_PTON@ +# if [EMAIL PROTECTED]@ +extern int inet_pton (int af, const char *restrict src, void *restrict dst); +# endif +#elif defined GNULIB_POSIXCHECK +# undef inet_pton +# define inet_pton(af,src,dst) \ + (GL_LINK_WARNING (inet_pton is unportable - \ + use gnulib module inet_pton for portability), \ + inet_pton (af, src, dst)) +#endif + +#endif /* _GL_ARPA_INET_H */ +#endif /* _GL_ARPA_INET_H */ diff --git a/gnulib/tests/.cvsignore b/gnulib/tests/.cvsignore index 68d2562..9bea902 100644 --- a/gnulib/tests/.cvsignore +++ b/gnulib/tests/.cvsignore @@ -24,3 +24,4 @@ test-unistd test-vasnprintf test-vasprintf test-wchar +test-EOVERFLOW.c diff --git a/proxy/Makefile.am b/proxy/Makefile.am index 2fe77c8..348be34 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -19,7 +19,7 @@ libvirt_proxy_SOURCES = libvirt_proxy.c @top_srcdir@/src/xend_internal.c \ @top_srcdir@/src/uuid.c libvirt_proxy_LDFLAGS = $(WARN_CFLAGS) libvirt_proxy_DEPENDENCIES = -libvirt_proxy_LDADD = +libvirt_proxy_LDADD = ../gnulib/lib/libgnu.la install-exec-hook: chmod u+s $(DESTDIR)$(libexecdir)/libvirt_proxy -- 1.5.5.1.68.gbdcd8 -- Libvir-list mailing list Libvir-list@redhat.com
Re: [Libvir] make syntax-check fails with bzr checkouts
The bzr problem was obviously that vc-list-files didn't support bzr. Failing with CVS was caused by a bashism in vc-list-files. In Ubuntu, /bin/sh points to dash instead of bash, but vc-list-files had #!/bin/sh. This patch fixes both issues: === modified file 'build-aux/vc-list-files' --- build-aux/vc-list-files 2008-02-01 19:47:07 + +++ build-aux/vc-list-files 2008-04-30 07:43:06 + @@ -39,6 +39,8 @@ exec git ls-files $dir elif test -d .hg; then exec hg locate $dir/* +elif test -d .bzr; then + exec bzr ls --versioned --kind=file ${*:---from-root} elif test -d CVS; then if test -x build-aux/cvsu; then build-aux/cvsu --find --types=AFGM $dir @@ -49,7 +51,7 @@ sub(/CVS\/Entries/, , f); \ print f $2; \ }}' \ - $(find ${*-*} -name Entries -print) /dev/null; + $(find ${*:-*} -name Entries -print) /dev/null; fi else echo $0: Failed to determine type of version control used in `pwd` 12 -- Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/ signature.asc Description: Digital signature -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] make syntax-check fails with bzr checkouts
Soren Hansen [EMAIL PROTECTED] wrote: The bzr problem was obviously that vc-list-files didn't support bzr. Failing with CVS was caused by a bashism in vc-list-files. In Ubuntu, /bin/sh points to dash instead of bash, but vc-list-files had #!/bin/sh. This patch fixes both issues: Hi Soren, Thanks for the patch. === modified file 'build-aux/vc-list-files' --- build-aux/vc-list-files 2008-02-01 19:47:07 + +++ build-aux/vc-list-files 2008-04-30 07:43:06 + @@ -39,6 +39,8 @@ exec git ls-files $dir elif test -d .hg; then exec hg locate $dir/* +elif test -d .bzr; then + exec bzr ls --versioned --kind=file ${*:---from-root} Unfortunately, the above no longer applies, due to upstream (gnulib) changes to deal with non-srcdir (aka VPATH) builds. I updated libvirt from gnulib just yesterday, and will again, later today. Can you adapt your patch to make bzr work with the newer version? }}' \ - $(find ${*-*} -name Entries -print) /dev/null; + $(find ${*:-*} -name Entries -print) /dev/null; Thanks for reporting that. Note though that POSIX appears to require the behavior that bash exhibits, so calling this a bashism doesn't seem right. However, in the spec, just beneath the part that talks about ${parameter-word} there are escape clauses for e.g., ${#parameter} and ${parameter%word} etc.: If parameter is '*' or '@', the result of the expansion is unspecified. but there is no such exemption for the ${parameter-word} syntax. All that to say that this looks more like an infelicity in dash, and since Ubuntu relies on it, you may want to investigate further. However, back to vc-list-files, that awk-based code is so hard to reach for me -- I avoid CVS, and when I do use it, I have cvsu in my path -- that it is rarely tested. Anyhow the use of * there is unnecessary, and in addition, there was a subtle (but probably never problematic) quoting bug. Here's the patch I've pushed to gnulib: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=173a9f0c48a16c3507f8 If you care about the CVS-oriented cases, there are two more patches. Note that the awk+find-based code *still* fails in some pathological cases, e.g., with a file named 'a b/CVS/Entries' in your hierarchy, but the response there is just don't do that. Or depend on find -print0+xargs -0, but that would be counter-productive just to avoid a warning in such an unlikely scenario. Jim -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 03:22:26AM -0400, Daniel Veillard wrote: On Wed, Apr 30, 2008 at 12:29:18AM -0400, Jim Paris wrote: Daniel P. Berrange wrote: This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax I still think our consensus from when I posted this patch last year (nic model=...) makes more sense ... but getting any form of this patch upstream sounds good to me. I'm fine with the patch. Concerning this detail of the syntax, we already know at that point that it's about a nic since we are in an interface description, so it's a bit redundant. Also it's the first time we introduce XML to describe a specific model of hardware (so far we managed to avoid this, from a virtualization POV it's more of a problem than a feature in my opinion), the advantage of model type=''/ to me is that we could reuse exactly the same construct each time we want to specify the hardware model of an emulated device, the device type being already defined by the englobing element (disk/input/graphic/serial/...) Since we are introducing new syntax, making it as generic as possible sounds better to me, And Ubuntu have already shipped a product with a patch using this syntax applied, so we can't reasonably change it. Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] How to get the memory used by a guest domin
On Wed, Apr 30, 2008 at 05:45:55PM +0530, Pranay Prasoon wrote: Hi, It appears to be no API available to provide the memory used by a guest domin. I looked at the availble libvirt api called virNodeGetCellsFreeMemory using which it is possible to get the free mem. But looking further I found that this is free memory of the whole box rather than based upon the guest domain. How can I get the memory used by a guest domin. virDomainGetInfo() It fills in a virDomainInfo struct with unsigned long maxMem; /* the maximum memory in KBytes allowed */ unsigned long memory; /* the memory in KBytes used by the domain */ Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 12:29:18AM -0400, Jim Paris wrote: Daniel P. Berrange wrote: This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax I still think our consensus from when I posted this patch last year (nic model=...) makes more sense ... but getting any form of this patch upstream sounds good to me. -if (snprintf(nic, sizeof(nic), nic,macaddr=%02x:%02x:%02x:%02x:%02x:%02x,vlan=%d, +if (net-model[0] != '\0') { +if (snprintf (model, sizeof (model), ,model=%s, net-model) += sizeof (model)) +goto error; +} else +model[0] = '\0'; + +if (snprintf(nic, sizeof(nic), + nic,macaddr=%02x:%02x:%02x:%02x:%02x:%02x,vlan=%d%s, net-mac[0], net-mac[1], net-mac[2], net-mac[3], net-mac[4], net-mac[5], - vlan) = sizeof(nic)) + vlan, model) = sizeof(nic)) You could simplify this and not require the temporary buffer if you do it this way: http://www.mail-archive.com/libvir-list@redhat.com/msg03557.html I committed the patch with this simplification included Regards, Dan -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] How to get the memory used by a guest domin
Hi dan, I got confused with your answer, virDomainInfo memory, Does it mean that all allocated memory is utilized by the guest OS? Their is good chance that Guest OS may not be utilizing all memory. How to find out the Currently running Guest Domains memory utilization level? On Wed, 2008-04-30 at 13:18 +0100, Daniel P. Berrange wrote:y On Wed, Apr 30, 2008 at 05:45:55PM +0530, Pranay Prasoon wrote: Hi, It appears to be no API available to provide the memory used by a guest domin. I looked at the availble libvirt api called virNodeGetCellsFreeMemory using which it is possible to get the free mem. But looking further I found that this is free memory of the whole box rather than based upon the guest domain. How can I get the memory used by a guest domin. virDomainGetInfo() It fills in a virDomainInfo struct with unsigned long maxMem; /* the maximum memory in KBytes allowed */ unsigned long memory; /* the memory in KBytes used by the domain */ Dan. Thanks Regards --Ajish -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] How to get the memory used by a guest domin
On Wed, Apr 30, 2008 at 06:37:26PM +0530, ajishrao wrote: Hi dan, I got confused with your answer, virDomainInfo memory, Does it mean that all allocated memory is utilized by the guest OS? No, this just tells you how much memory the hypervisor has allocated to the guest OS. Their is good chance that Guest OS may not be utilizing all memory. Correct. The only way to find that out is to ask the guest OS for its fine grained breakdown of memory usage. The hypervisor/host OS doesn't have ability to get this information. How to find out the Currently running Guest Domains memory utilization level? You'll want to have some monitoring agent inside your guest OS. One example lightweight agent is 'collected'. It'll transmit utilization data to any host over the network where you can analyse it Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[Libvir] PATCH: Autogenerate table of contents for docs
Alot of the docs pages have manually written table of contents linking to headings with the page. I figured this is a good candidate for being auto-generated. The basic idea is that given a document with a series of headings h2a name=xxxFoo/a/h2 .. h3a name=xxxBar/a/h3 .. h3a name=xxxWizz/a/h3 .. h2a name=xxxOooh/a/h2 .. h3a name=xxxAhhh/a/h3 Then, generate a table of contents with a nested set of lists ul. THe XSL below attempts todo this for heading levels h2 - h6, and splices the TOC into the page where it sees an ul id='toc'/ul element (typically just after h1). I'm kind of out of practice with XSL, so there's probably a nicer way to write the 'toc' template below... Dan. Index: docs/page.xsl === RCS file: /data/cvs/libvirt/docs/page.xsl,v retrieving revision 1.7 diff -u -r1.7 page.xsl --- docs/page.xsl 28 Apr 2008 08:29:35 - 1.7 +++ docs/page.xsl 30 Apr 2008 12:55:20 - @@ -59,6 +59,54 @@ /ul /xsl:template + xsl:template name=toc +ul + xsl:for-each select=/html/body/h2[count(a) = 1] +xsl:variable name=thishead select=./ +li + a href=#{a/@name}xsl:value-of select=a/text()//a + xsl:if test=count(./following-sibling::h3[preceding-sibling::h2[1] = $thishead and count(a) = 1]) 0 +ul + xsl:for-each select=./following-sibling::h3[preceding-sibling::h2[1] = $thishead and count(a) = 1] +xsl:variable name=thissubhead select=./ +li + a href=#{a/@name}xsl:value-of select=a/text()//a + xsl:if test=count(./following-sibling::h4[preceding-sibling::h3[1] = $thissubhead and count(a) = 1]) 0 +ul + xsl:for-each select=./following-sibling::h4[preceding-sibling::h3[1] = $thissubhead and count(a) = 1] +li + a href=#{a/@name}xsl:value-of select=a/text()//a + xsl:if test=count(./following-sibling::h5[preceding-sibling::h4[1] = $thissubhead and count(a) = 1]) 0 +ul + xsl:for-each select=./following-sibling::h5[preceding-sibling::h4[1] = $thissubhead and count(a) = 1] +li + a href=#{a/@name}xsl:value-of select=a/text()//a + xsl:if test=count(./following-sibling::h6[preceding-sibling::h5[1] = $thissubhead and count(a) = 1]) 0 +ul + xsl:for-each select=./following-sibling::h6[preceding-sibling::h5[1] = $thissubhead and count(a) = 1] +li + a href=#{a/@name}xsl:value-of select=a/text()//a +/li + /xsl:for-each +/ul + /xsl:if +/li + /xsl:for-each +/ul + /xsl:if +/li + /xsl:for-each +/ul + /xsl:if +/li + /xsl:for-each +/ul + /xsl:if +/li + /xsl:for-each +/ul + /xsl:template + !-- This is the master page structure -- xsl:template match=/ mode=page xsl:param name=pagename/ @@ -93,7 +141,16 @@ /xsl:apply-templates /div div id=content -xsl:copy-of select=html/body/*/ +xsl:for-each select=html/body/* + xsl:choose +xsl:when test=name() = 'ul' and @id = 'toc' + xsl:call-template name=toc/ +/xsl:when +xsl:otherwise + xsl:copy-of select=./ +/xsl:otherwise + /xsl:choose +/xsl:for-each /div /div div id=footer -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 12:43:06PM +0100, Daniel P. Berrange wrote: And Ubuntu have already shipped a product with a patch using this syntax applied, so we can't reasonably change it. I refuse to be bound by such arguments. We just can't accept this, if someone ships a mofified version before it got agreed upon upstream, they perfectly well know that they are putting their users at risk and will have to sort the mess later. That's the rule of development in our whole ecosystem. A patch has to be reviewed by its technical merits. If someone ships a patched version and upstream uses something different in the end they will have to keep another patch to preserve the compatibility. People should push things here quickly, if we are not quick enough, feel free to complain publicly, but please don't play with the end users. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[Daniel Veillard] Re: [Libvir] [PATCH] update from gnulib
Forwarding, on request: Date: Wed, 30 Apr 2008 04:53:43 -0400 From: Daniel Veillard [EMAIL PROTECTED] To: Jim Meyering [EMAIL PROTECTED] Cc: undisclosed-recipients: ; Subject: Re: [Libvir] [PATCH] update from gnulib Message-ID: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] User-Agent: Mutt/1.5.13 (2006-09-08) On Tue, Apr 29, 2008 at 05:57:36PM +0200, Jim Meyering wrote: Signed-off-by: Jim Meyering [EMAIL PROTECTED] Hum, to me the gnulib update side is under your control, I don't feel it's necessary for you to post the patch, unless you know there may be an associated change for the other developpers. Others may disagree but I don't think I can really review those :-) Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Daniel Veillard] Re: [Libvir] [PATCH] update from gnulib
Daniel P. Berrange [EMAIL PROTECTED] wrote: ... Yep, I agree - its fine to update gnulib and just notify the list afterwards. There's nothing we can sensibly review in the patch, and after all, the whole point of gnulib is that other people have already reviewed tested this for us :-) Mostly true ;-) Last night I saw a new configure-time diagnostic that may indicate an underlying problem -- but doesn't affect any builds or tests I've run. I'll investigate, eventually. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Autogenerate table of contents for docs
On Wed, Apr 30, 2008 at 02:05:12PM +0100, Daniel P. Berrange wrote: Alot of the docs pages have manually written table of contents linking to headings with the page. I figured this is a good candidate for being auto-generated. The basic idea is that given a document with a series of headings h2a name=xxxFoo/a/h2 .. h3a name=xxxBar/a/h3 .. h3a name=xxxWizz/a/h3 .. h2a name=xxxOooh/a/h2 .. h3a name=xxxAhhh/a/h3 Then, generate a table of contents with a nested set of lists ul. THe XSL below attempts todo this for heading levels h2 - h6, and splices the TOC into the page where it sees an ul id='toc'/ul element (typically just after h1). I'm kind of out of practice with XSL, so there's probably a nicer way to write the 'toc' template below... Yeah, it look weird but since: 1/ the HTML is flat you can't base counting more on structure 2/ h2/h3/h4/h5/h6 are not a real subsetting pattern you can't use recursion one suggestion, instead of a href=#{a/@name}xsl:value-of select=a/text()//a at each level, use something like a href=#{a/@name}xsl:textxsl:value-of select=string(a)//xsl:text/a to still capture text if the header is not just made of a single text node. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[Libvir] build problems on RHEL5, at least some are now fixed
Daniel Berrange noticed some build problems on RHEL5. Some were due to my not adding two .m4 files in yesterday's gnulib update. [excuse time ;-) Normally (in other projects), the gnulib-update process is automatic, since the imported files are not version-controlled, but for libvirt I have to identify new files pulled in by a gnulib update, and obviously didn't complete that step. Identifying and adding added files is not hard. Just have to remember to do it before committing anything. Actually, the trick is (as usual) to *automate* the process, so we don't have to depend on my memory. This is now on my list. Anyhow, I've committed the change. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] build problems on RHEL5, at least some are now fixed
On Wed, Apr 30, 2008 at 06:20:31PM +0200, Jim Meyering wrote: Daniel Berrange noticed some build problems on RHEL5. Some were due to my not adding two .m4 files in yesterday's gnulib update. [excuse time ;-) Normally (in other projects), the gnulib-update process is automatic, since the imported files are not version-controlled, but for libvirt I have to identify new files pulled in by a gnulib update, and obviously didn't complete that step. Identifying and adding added files is not hard. Just have to remember to do it before committing anything. Actually, the trick is (as usual) to *automate* the process, so we don't have to depend on my memory. This is now on my list. Anyhow, I've committed the change. I've tested on RHEL-5 it works as expected now. Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] make syntax-check fails with bzr checkouts
On Wed, Apr 30, 2008 at 12:19:51PM +0200, Jim Meyering wrote: Unfortunately, the above no longer applies, due to upstream (gnulib) changes to deal with non-srcdir (aka VPATH) builds. I updated libvirt from gnulib just yesterday, and will again, later today. Can you adapt your patch to make bzr work with the newer version? I'll do it when you're done updating gnulib. }}' \ - $(find ${*-*} -name Entries -print) /dev/null; + $(find ${*:-*} -name Entries -print) /dev/null; Thanks for reporting that. Note though that POSIX appears to require the behavior that bash exhibits, so calling this a bashism doesn't seem right. No. POSIX requires that ${*-*} should expand to * if $* is unset (and not if it's null). $* is defined to expand to the positional parameters starting from 1. The spec is not *entirely* clear, I'll give you that, but considering $* to be unset (instead of just null) messes with my sanity. At any rate, relying on bash's interpretation of the spec is a text book example of a bashism, if you ask me. but there is no such exemption for the ${parameter-word} syntax. All that to say that this looks more like an infelicity in dash, and since Ubuntu relies on it, you may want to investigate further. Well, if anyone insists on not changing something that only works with bash to something that works with any shell (${*:-*} vs. ${*-*}) , but also refuses to put /bin/bash explicitly as the interpreter is just being pointlessly difficult, IMO. However, back to vc-list-files, that awk-based code is so hard to reach for me -- I avoid CVS, and when I do use it, I have cvsu in my path -- that it is rarely tested. Anyhow the use of * there is unnecessary, and in addition, there was a subtle (but probably never problematic) quoting bug. Here's the patch I've pushed to gnulib: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=173a9f0c48a16c3507f8 That patch will make the cvs case fail, too. It will prepend a ./ to all path names which will screw with the comparison, AFAICS. If you care about the CVS-oriented cases, there are two more patches. Not really. :) It just popped up when I was trying to determine why my bzr case was failing. -- Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/ signature.asc Description: Digital signature -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] make syntax-check fails with bzr checkouts
Soren Hansen [EMAIL PROTECTED] wrote: On Wed, Apr 30, 2008 at 12:19:51PM +0200, Jim Meyering wrote: Unfortunately, the above no longer applies, due to upstream (gnulib) changes to deal with non-srcdir (aka VPATH) builds. I updated libvirt from gnulib just yesterday, and will again, later today. Can you adapt your patch to make bzr work with the newer version? I'll do it when you're done updating gnulib. I'm done for now, and pulled the new version into libvirt. ... Well, if anyone insists on not changing something that only works with bash to something that works with any shell (${*:-*} vs. ${*-*}) , but also refuses to put /bin/bash explicitly as the interpreter is just being pointlessly difficult, IMO. Um... maybe you didn't notice that I removed the problematic syntax altogether? ... Here's the patch I've pushed to gnulib: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=173a9f0c48a16c3507f8 That patch will make the cvs case fail, too. It will prepend a ./ to all path names which will screw with the comparison, AFAICS. It handled one case. The two subsequent patches addressed the others. If you care about the CVS-oriented cases, there are two more patches. -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 12:43:06PM +0100, Daniel P. Berrange wrote: And Ubuntu have already shipped a product with a patch using this syntax applied, so we can't reasonably change it. Ironically, I'm with Daniel Veillard on this one. Sure, it'd be nice if it was factored into the decision to some extent, but I'd be sad if I have somehow short-circuited the development process by forcing this decision onto the rest of you guys. I clearly read too much into the fact that Richard had posted a patch that used this syntax and noone objected. My bad entirely, and I'll deal with the mess it causes. Somehow. :) -- Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/ signature.asc Description: Digital signature -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] make syntax-check fails with bzr checkouts
Soren Hansen [EMAIL PROTECTED] wrote: ... Here's the patch I've pushed to gnulib: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=173a9f0c48a16c3507f8 That patch will make the cvs case fail, too. It will prepend a ./ to all path names which will screw with the comparison, AFAICS. It handled one case. The two subsequent patches addressed the others. Oh, ok. Sorry. I thought they would adress different things. I can't see them in that git tree, I think? Looking at the summary, I see three change sets that mention vc-list-files: http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=summary -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] build problems on RHEL5, at least some are now fixed
I've tested on RHEL-5 it works as expected now. can you let me know which version of libvirt builds on RHEL5 please as i have been having nightmare getting the src rpm to build - Or does anyone have a recent libvirt for RHEL5 as i could do with it to go with Xen 3.2 thanks -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 07:27:41PM +0200, Soren Hansen wrote: On Wed, Apr 30, 2008 at 12:43:06PM +0100, Daniel P. Berrange wrote: And Ubuntu have already shipped a product with a patch using this syntax applied, so we can't reasonably change it. Ironically, I'm with Daniel Veillard on this one. Sure, it'd be nice if it was factored into the decision to some extent, but I'd be sad if I have somehow short-circuited the development process by forcing this decision onto the rest of you guys. I clearly read too much into the fact that Richard had posted a patch that used this syntax and noone objected. My bad entirely, and I'll deal with the mess it causes. WRT to the network interface type attribute, I advised Soren at the virt summit in Austin, that since Rich Jones had already posted the patch and we'd all basically agreed on syntax it was reasonably to include the patch in Ubuntu. It was only a matter of time before we merged it - as I have done today. Now, the disk model syntax supporting virtio is where I agree with Daniel that it should have been posted upstream before inclusion in a product Even if the code was just a quick hack, not in a state fit for merging - it is always beneficial to post as early as possible just for the sake of visibility comment. This said I believe the proposed 'bus' atribute for disks is the optimal way to handle virtio for disks. Just for future enhancements please post ideas to this list asap. I myself have posted ideas more than 1 year before actually getting around to implementing them, so there's no requirement to follow through with code immediately :-) Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] build problems on RHEL5, at least some are now fixed
On Wed, Apr 30, 2008 at 09:29:10PM +0100, Tom Brown wrote: I've tested on RHEL-5 it works as expected now. can you let me know which version of libvirt builds on RHEL5 please as i have been having nightmare getting the src rpm to build - Or does anyone have a recent libvirt for RHEL5 as i could do with it to go with Xen 3.2 All versions of libvirt should build successfully with RHEL-5. It is one of our supported platforms - we intend to support any Linux distro with software of RHEL-5 vintage or later. Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver
On Wed, Apr 30, 2008 at 11:36:33PM +0100, Daniel P. Berrange wrote: WRT to the network interface type attribute, I advised Soren at the virt summit in Austin, that since Rich Jones had already posted the patch and we'd all basically agreed on syntax it was reasonably to include the patch in Ubuntu. It was only a matter of time before we merged it - as I have done today. Thanks very much. That strikes that bit off of my Stuff I might need to worry about list. :) Now, the disk model syntax supporting virtio is where I agree with Daniel that it should have been posted upstream before inclusion in a product Even if the code was just a quick hack, not in a state fit for merging - it is always beneficial to post as early as possible just for the sake of visibility comment. This is good advice. Thanks. This said I believe the proposed 'bus' atribute for disks is the optimal way to handle virtio for disks. I agree. A model type='foo' / element in the disk definition could still be used to specify which particular SCSI controller you'd like. Just for future enhancements please post ideas to this list asap. I'll keep that in mind. I'm truly sorry for the stir I've caused and I have every intention of making sure it won't happen again. I myself have posted ideas more than 1 year before actually getting around to implementing them, so there's no requirement to follow through with code immediately :-) :) -- Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/ signature.asc Description: Digital signature -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[Libvir] Re: Can't connect to lxc driver
On Wed, Apr 30, 2008 at 05:22:22PM -0700, Dave Leskovec wrote: Hi Dan, I updated today to the latest CVS and can no longer connect to the lxc driver. I've tracked it down to this check in doRemoteOpen() in remote_internal.c: if (( #ifdef HAVE_XMLURI_QUERY_RAW uri-query_raw = #else uri-query = #endif qparam_get_query (vars)) == NULL) goto failed; Looking at the recent VirBuffer changes, it looks like they changed the behavior of qparam_get_query. With the old VirBuffer, qparam_get_query returned a non-NULL result because virBufferNew allocated space. The new VirBuffer doesn't allocate space until something is added and hence this function returns NULL if nothing is ever put in the buffer. I'm not familiar enough with the intended behavior to know what the fix should be here. So two things - with the old code it was impossible for qparam_get_query to return NULL, so the NULL check was redundant. Aside from that, it looks like it is valid for uri-query to be set to NULL anway to indicate that no variables are set. So I'd suggest you try just removing the NULL check goto failed. If that doesn't work, then modify get_query to return , if the buffer is NULL. Regards, Dan. -- |: Red Hat, Engineering, Boston -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list