Re: [libvirt] [RFC] [PATCH 3/3 v2] vepa+vsi: Some experimental code for 802.1Qbh

2010-05-21 Thread Scott Feldman
On 5/21/10 6:50 AM, "Stefan Berger" wrote: > This patch may get 802.1Qbh devices working. I am adding some code to > poll for the status of an 802.1Qbh device and loop for a while until the > status indicates success. This part for sure needs more work and > testing... I think we can drop this p

Re: [libvirt] [RFC] [PATCH 2/3] vepa+vsi: add handling of 802.1Qbg using netlink messages

2010-05-21 Thread Chris Wright
* Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > This is so far a more or less experimental patch that adds code for > communicating with the external lldpad daemon using the recently added > netlink messages. It's communicating using multicast netlink messages in > case of 802.1Qbg and unicas

Re: [libvirt] [RFC] [PATCH 1/3 v2] vepa+vsi: Introduce dependency on libnl

2010-05-21 Thread Chris Wright
* Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > This patch introduces a dependency on libnl, which subsequent patches > will then use. > > Changes from V1 to V2: > - added diffstats > - following changes in tree > > Signed-off-by: Stefan Berger This looks good to me Acked-by: Chris Wrigh

Re: [libvirt] [PATCH v7] vepa: parsing for 802.1Qb{g|h} XML

2010-05-21 Thread Chris Wright
* Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > Below is David Alan's original patch with lots of changes. > > In particular, it now parses the following two XML descriptions, one > for 802.1Qbg and 802.1Qbh and stored the data internally. The actual > triggering of the switch setup protoco

[libvirt] [PATCH] build: fix cppi warnings

2010-05-21 Thread Eric Blake
* src/util/bitmap.h (includes): Placate cppi. --- Pushing as obvious, to keep 'make syntax-check' happy. src/util/bitmap.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/bitmap.h b/src/util/bitmap.h index be897ff..08515d1 100644 --- a/src/util/bitmap.h +++

[libvirt] [PATCH v7] vepa: parsing for 802.1Qb{g|h} XML

2010-05-21 Thread Stefan Berger
Below is David Alan's original patch with lots of changes. In particular, it now parses the following two XML descriptions, one for 802.1Qbg and 802.1Qbh and stored the data internally. The actual triggering of the switch setup protocol has not been implemented here but the relevant code to do th

Re: [libvirt] [PATCH] build: force init scripts to rebuild on changed --prefix

2010-05-21 Thread Matthias Bolte
2010/5/21 Eric Blake : > Otherwise, './configure --prefix=/foo && make && >  ./configure --prefix=/bar && make' leaves the wrong files > in libvirtd.init (/foo instead of /bar). > > * daemon/Makefile.am (libvirtd.init): Add dependency on > config.status.  Reported by Cole Robinson. > --- > > Thanks

[libvirt] [PATCH] build: force init scripts to rebuild on changed --prefix

2010-05-21 Thread Eric Blake
Otherwise, './configure --prefix=/foo && make && ./configure --prefix=/bar && make' leaves the wrong files in libvirtd.init (/foo instead of /bar). * daemon/Makefile.am (libvirtd.init): Add dependency on config.status. Reported by Cole Robinson. --- Thanks for the simple recipe for testing; and

Re: [libvirt] [PATCH v2] storage: Combine some duplicate code

2010-05-21 Thread Eric Blake
On 05/21/2010 11:05 AM, Cole Robinson wrote: > Volume detection in the scsi backend was duplicating code already > present in storage_backend.c. Let's drop the duplicate code. > > Also, change the shared function name to be less generic, and remove > some error squashing in the other call site. A

Re: [libvirt] [PATCH v2] storage: mpath: Clean up some error handling

2010-05-21 Thread Eric Blake
On 05/21/2010 11:05 AM, Cole Robinson wrote: > We were squashing error messages in a few cases. Recode to follow common > ret = -1 convention. > > v2: Handle more error squashing issues further up in MakeNewVol and > CreateVols. Use ret = -1 convention in MakeVols. ACK; looks better this time

Re: [libvirt] [PATCH v2] storage: Sanitize pool target paths

2010-05-21 Thread Eric Blake
On 05/21/2010 11:05 AM, Cole Robinson wrote: > Spurious / in a pool target path makes life difficult for apps using the > GetVolByPath, and doing other path based comparisons with pools. This > has caused a few issues for virt-manager users: > > https://bugzilla.redhat.com/show_bug.cgi?id=494005 >

Re: [libvirt] [PATCH v2] storage: Check for invalid storage mode before opening

2010-05-21 Thread Cole Robinson
On 05/21/2010 02:17 PM, Eric Blake wrote: > On 05/21/2010 11:03 AM, Cole Robinson wrote: >> If a directory pool contains pipes or sockets, a pool start can fail or hang: >> >> https://bugzilla.redhat.com/show_bug.cgi?id=589577 >> >> We already try to avoid these special files, but only attempt afte

Re: [libvirt] [PATCH v2] storage: Check for invalid storage mode before opening

2010-05-21 Thread Eric Blake
On 05/21/2010 11:03 AM, Cole Robinson wrote: > If a directory pool contains pipes or sockets, a pool start can fail or hang: > > https://bugzilla.redhat.com/show_bug.cgi?id=589577 > > We already try to avoid these special files, but only attempt after > opening the path, which is where the proble

Re: [libvirt] [PATCH] build: distribute missing file

2010-05-21 Thread Matthias Bolte
2010/5/20 Eric Blake : > On 05/19/2010 04:42 PM, Matthias Bolte wrote: >>> @@ -46,7 +46,8 @@ qemuhelpdata = \ >>>        qemu-0.10.5 \ >>>        qemu-0.12.1 \ >>>        qemu-kvm-0.10.5 \ >>> -       qemu-kvm-0.11.0-rc2 >>> +       qemu-kvm-0.11.0-rc2 \ >>> +       qemu-kvm-0.12.3 >>> >>>  EXTRA_D

Re: [libvirt] [PATCH 1/3] Add simple bitmap operations to utils

2010-05-21 Thread Jim Fehlig
Eric Blake wrote: > On 05/21/2010 09:29 AM, Jim Fehlig wrote: > >> This and your other comments are addressed in V3. >> >> > > Oops, just realized we missed one thing - if you haven't pushed yet, > then please squash in a change to use ATTRIBUTE_RETURN_CHECK in bitmap.h > for the three func

Re: [libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing

2010-05-21 Thread Laine Stump
On 05/21/2010 01:21 PM, Eric Blake wrote: On 05/21/2010 09:28 AM, Cole Robinson wrote: Any interest in doing this with netlink instead? (I've got this "thing" against parsing text files to get information if it can be retrieved via a nice clean API). If so, I think I can whip up the equivale

Re: [libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing

2010-05-21 Thread Laine Stump
I'm stepping back, for now, on my suggestion of using libnl to do this. The proposed method works, and solves a serious problem. Using libnl would also work, but would create a new dependency (which can be a bit hairy with libnl - eg RHEL5 has libnl-1.0 which is API-incompatible with libnl-1.1,

Re: [libvirt] Draft of pre migration checks framework

2010-05-21 Thread Eric Blake
On 05/21/2010 07:16 AM, Paolo Smiraglia wrote: > Hi guys, I'm working on a pre migration checks implementation. > > The patch files attached provide a framework to execute > pre-migration-checks before the domain migration. First, thanks for the efforts (sometimes, as open source developers, we g

Re: [libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing

2010-05-21 Thread Eric Blake
On 05/21/2010 09:28 AM, Cole Robinson wrote: >> Any interest in doing this with netlink instead? (I've got this "thing" >> against parsing text files to get information if it can be retrieved via >> a nice clean API). If so, I think I can whip up the equivalent code with >> libnl calls, but prob

Re: [libvirt] [PATCH] daemon: Export SDL audio environment variables

2010-05-21 Thread Cole Robinson
On 05/20/2010 03:17 PM, Eric Blake wrote: > On 05/20/2010 10:04 AM, Cole Robinson wrote: >> /etc/sysconfig/libvirtd has a few environment variables for configuring >> libvirt SDL audio. The libvirtd process doesn't see these, however, because >> they are never exported. Let's export the variables a

Re: [libvirt] [PATCH 3/3] storage: Check for invalid storage mode before opening

2010-05-21 Thread Cole Robinson
On 05/20/2010 06:25 PM, Eric Blake wrote: > On 05/20/2010 01:23 PM, Cole Robinson wrote: >> If a directory pool contains pipes or sockets, a pool start can fail or hang: >> >> https://bugzilla.redhat.com/show_bug.cgi?id=589577 >> >> We already try to avoid these special files, but only attempt afte

Re: [libvirt] [PATCH] storage: Sanitize pool target paths

2010-05-21 Thread Cole Robinson
On 05/20/2010 03:28 PM, Eric Blake wrote: > On 05/20/2010 10:04 AM, Cole Robinson wrote: >> Spurious / in a pool target path makes life difficult for apps using the >> GetVolByPath, and doing other path based comparisons with pools. This >> has caused a few issues for virt-manager users: >> >> http

[libvirt] [PATCH v2] storage: Sanitize pool target paths

2010-05-21 Thread Cole Robinson
Spurious / in a pool target path makes life difficult for apps using the GetVolByPath, and doing other path based comparisons with pools. This has caused a few issues for virt-manager users: https://bugzilla.redhat.com/show_bug.cgi?id=494005 https://bugzilla.redhat.com/show_bug.cgi?id=593565 Add

[libvirt] [PATCH v2] storage: mpath: Clean up some error handling

2010-05-21 Thread Cole Robinson
We were squashing error messages in a few cases. Recode to follow common ret = -1 convention. v2: Handle more error squashing issues further up in MakeNewVol and CreateVols. Use ret = -1 convention in MakeVols. Signed-off-by: Cole Robinson --- src/storage/storage_backend_mpath.c | 40

[libvirt] [PATCH v2] storage: Combine some duplicate code

2010-05-21 Thread Cole Robinson
Volume detection in the scsi backend was duplicating code already present in storage_backend.c. Let's drop the duplicate code. Also, change the shared function name to be less generic, and remove some error squashing in the other call site. v2: Rebased around other storage changes Signed-off-by:

[libvirt] [PATCH v2] storage: Check for invalid storage mode before opening

2010-05-21 Thread Cole Robinson
If a directory pool contains pipes or sockets, a pool start can fail or hang: https://bugzilla.redhat.com/show_bug.cgi?id=589577 We already try to avoid these special files, but only attempt after opening the path, which is where the problems lie. Unify volume opening into a single function which

Re: [libvirt] [PATCH] Fix up basic migration.

2010-05-21 Thread Eric Blake
On 05/21/2010 07:22 AM, Chris Lalancette wrote: >>> -virCheckFlags(VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC, >>> - -1); >>> - >> >> Why are you removing the valid flag check altogether? Is it a matter of >> adding more valid flags, or is this just a forwarding

Re: [libvirt] [PATCH] Remove dead code after refactoring qemudDomainStart

2010-05-21 Thread Cole Robinson
On 05/21/2010 05:47 AM, Jiri Denemark wrote: > The event is already generated and sent by qemudDomainObjStart, no need > to do anything about here. > --- > src/qemu/qemu_driver.c |3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu

Re: [libvirt] [PATCH] Fix failing virGetHostname.

2010-05-21 Thread Cole Robinson
On 05/20/2010 03:57 PM, Chris Lalancette wrote: > We've been running into a lot of situations where > virGetHostname() is returning "localhost", where a plain > gethostname() would have returned the correct thing. This > is because virGetHostname() is *always* trying to canonicalize > the name ret

Re: [libvirt] [PATCH 3/3] Fix race in finding available vnc port

2010-05-21 Thread Eric Blake
On 05/21/2010 10:00 AM, Jim Fehlig wrote: > +if (virBitmapGetBit(driver->reservedVNCPorts, > +i - QEMU_VNC_PORT_MIN, &used) < 0) > +VIR_DEBUG("virBitmapGetBit failed on bit %d", i - > QEMU_VNC_PORT_MIN); > + > +if (used) > +contin

Re: [libvirt] [PATCH 1/3] Add simple bitmap operations to utils

2010-05-21 Thread Eric Blake
On 05/21/2010 09:29 AM, Jim Fehlig wrote: > This and your other comments are addressed in V3. > Oops, just realized we missed one thing - if you haven't pushed yet, then please squash in a change to use ATTRIBUTE_RETURN_CHECK in bitmap.h for the three functions that return an int. -- Eric Blake

Re: [libvirt] [PATCH 1/3] Add simple bitmap operations to utils

2010-05-21 Thread Eric Blake
On 05/21/2010 09:29 AM, Jim Fehlig wrote: > > This and your other comments are addressed in V3. > > V3: > - Check for overflow in virBitmapAlloc > - Fix copy and paste bug in virBitmapAlloc > - Use size_t in prototypes > - Add ATTRIBUTE_NONNULL in prototypes where appropriate > and re

Re: [libvirt] [PATCH 1/3] storage: mpath: Clean up some error handling

2010-05-21 Thread Cole Robinson
On 05/20/2010 06:10 PM, Eric Blake wrote: > On 05/20/2010 01:23 PM, Cole Robinson wrote: >> We were squashing error messages in a few cases. Recode to follow common >> ret = -1 convention. > > s/squashing/duplicating/, but I did check that the only caller, > virStorageBackendMpathNewVol does print

Re: [libvirt] [PATCH 3/3] Fix race in finding available vnc port

2010-05-21 Thread Jim Fehlig
Eric Blake wrote: > On 05/20/2010 02:45 PM, Jim Fehlig wrote: > >> for (i = QEMU_VNC_PORT_MIN; i < QEMU_VNC_PORT_MAX; i++) { >> int fd; >> int reuse = 1; >> struct sockaddr_in addr; >> +bool used = false; >> + >> +virBitmapGetBit(driver->reservedVN

Re: [libvirt] [PATCH 1/3] Add simple bitmap operations to utils

2010-05-21 Thread Jim Fehlig
Eric Blake wrote: > On 05/20/2010 02:45 PM, Jim Fehlig wrote: > >> +virBitmapPtr virBitmapAlloc(size_t size) >> +{ >> +virBitmapPtr bitmap; >> +size_t sz = (size + VIR_BITMAP_BITS_PER_UNIT - 1) / >> +VIR_BITMAP_BITS_PER_UNIT; >> > > Check for overflow: > if (SIZE_MAX - V

Re: [libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing

2010-05-21 Thread Cole Robinson
On 05/21/2010 01:23 AM, Laine Stump wrote: > On 05/20/2010 07:41 PM, Cole Robinson wrote: >> Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=235961 >> >> If using the default virtual network, an easy way to lose guest network >> connectivity is to install libvirt inside the VM. The autostart

Re: [libvirt] [PATCH] network: bridge: Don't start network if it collides with host routing

2010-05-21 Thread Dave Allan
On Fri, May 21, 2010 at 01:23:32AM -0400, Laine Stump wrote: > On 05/20/2010 07:41 PM, Cole Robinson wrote: > >Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=235961 > > > >If using the default virtual network, an easy way to lose guest network > >connectivity is to install libvirt inside th

[libvirt] [RFC] [PATCH 3/3 v2] vepa+vsi: Some experimental code for 802.1Qbh

2010-05-21 Thread Stefan Berger
This patch may get 802.1Qbh devices working. I am adding some code to poll for the status of an 802.1Qbh device and loop for a while until the status indicates success. This part for sure needs more work and testing... I am recycling link_dump from a previous patch. Changes from V1 to V2: - Follo

[libvirt] [RFC] [PATCH 2/3] vepa+vsi: add handling of 802.1Qbg using netlink messages

2010-05-21 Thread Stefan Berger
This is so far a more or less experimental patch that adds code for communicating with the external lldpad daemon using the recently added netlink messages. It's communicating using multicast netlink messages in case of 802.1Qbg and unicast using 802.1Qbh. In the multicast case I am currently expec

[libvirt] [RFC] [PATCH 1/3 v2] vepa+vsi: Introduce dependency on libnl

2010-05-21 Thread Stefan Berger
This patch introduces a dependency on libnl, which subsequent patches will then use. Changes from V1 to V2: - added diffstats - following changes in tree Signed-off-by: Stefan Berger --- configure.ac| 24 libvirt.spec.in | 14 ++ src/Makefile.am |

[libvirt] [PATCH v6] vepa: parsing for 802.1Qb{g|h} XML

2010-05-21 Thread Stefan Berger
Below is David Alan's original patch with lots of changes. In particular, it now parses the following two XML descriptions, one for 802.1Qbg and 802.1Qbh and stored the data internally. The actual triggering of the switch setup protocol has not been implemented here but the relevant code to do th

Re: [libvirt] [PATCH] Remove isValidIfname.

2010-05-21 Thread Chris Lalancette
On 05/20/2010 05:30 PM, Eric Blake wrote: > On 05/20/2010 01:57 PM, Chris Lalancette wrote: >> We shouldn't be checking validity in domain_conf, since >> it can be used by multiple different hosts and hypervisors. >> Remove the check completely. >> >> >> -static bool >> -isValidIfname(const char

Re: [libvirt] [PATCH] Fix up basic migration.

2010-05-21 Thread Chris Lalancette
On 05/20/2010 05:35 PM, Eric Blake wrote: > On 05/20/2010 01:57 PM, Chris Lalancette wrote: >> Basic live migration was broken by the commit that added >> non-shared block support. It also added a couple of >> built-in memory leaks. This patch fixes these problems >> and allows normal live migrat

[libvirt] Draft of pre migration checks framework

2010-05-21 Thread Paolo Smiraglia
Hi guys, I'm working on a pre migration checks implementation. The patch files attached provide a framework to execute pre-migration-checks before the domain migration. 1 - FRAMEWORK OVERVIEW ==

Re: [libvirt] [PATCH v5] vepa: parsing for 802.1Qb{g|h} XML

2010-05-21 Thread Stefan Berger
On Thu, 2010-05-20 at 16:55 -0400, Stefan Berger wrote: > On Thu, 2010-05-20 at 13:32 -0700, Scott Feldman wrote: > > On 5/20/10 1:10 PM, "Stefan Berger" wrote: > > > > > > > > > Can we use something more generic than since VSI is a .bg term? > > Something like virtual_port? > > Fine wi

Re: [libvirt] [libvirt-users] Update of libvirt website required. not all information about XML tags

2010-05-21 Thread Марк Коренберг
2010/5/21 Jiri Denemark : >> >>> The problem desribed here: >> >>> https://bugzilla.redhat.com/show_bug.cgi?id=593266 >> >>> >> >>> Please update http://www.libvirt.org/formatdomain.html and describe >> >>> NEW xml tags, like for hard drive and all cpu >> >>> tags, other if any. >> >> >> >> W

[libvirt] [PATCH] Remove dead code after refactoring qemudDomainStart

2010-05-21 Thread Jiri Denemark
The event is already generated and sent by qemudDomainObjStart, no need to do anything about here. --- src/qemu/qemu_driver.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2f644c9..5c8ab38 100644 --- a/src/qemu/qemu

Re: [libvirt] [libvirt-users] Update of libvirt website required. not all information about XML tags

2010-05-21 Thread Jiri Denemark
> >>> The problem desribed here: > >>> https://bugzilla.redhat.com/show_bug.cgi?id=593266 > >>> > >>> Please update http://www.libvirt.org/formatdomain.html and describe > >>> NEW xml tags, like for hard drive and all cpu > >>> tags, other if any. > >> > >> What cpu tag are you missing from t

Re: [libvirt] [PATCH v2] Init script for handling guests on shutdown/boot

2010-05-21 Thread Jiri Denemark
> > Are we sure that init scripts called during '/sbin/shutdown' are > > normally called with 'stop' rather than 'shutdown' argument? > > Hmm, I don't think anything calls init scripts with 'shutdown' argument, but > it might probably be better to rename as 'guestshutdown' to match > 'gueststatus

Re: [libvirt] [PATCH 0/4] Fix autostart to restore managesaved domains

2010-05-21 Thread Jiri Denemark
> The fix required some refactoring in various places. More details about why > and > what had to be reworked can be found in each of the patches. > > Refactor qemudDomainRestore > Factor out def assignment to existing domain from virDomainAssignDef > Refactor qemudDomainStart > Autostart