Re: [libvirt] libvirt default network

2014-02-12 Thread Thierry Parmentelat
Hi again

So we did 2 changes in the specfile that are described below
This has gone through all our nightlies and all, so that works for us

I’m sorry that I can’t seem to get git send-email to work on my mac (complains 
about missing perl modules ?!?)
Fortunately the changes I did are so simple, I hope you can use the following 
material

http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=a0e03e6894d8e8486e79531967b92b83d6d59b86

http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=7f0c4d07b5faac3f0fb07cd8240f5ae0e1063560

Of course I can post using some other scheme if that’s not working for you guys 

Thanks — Thierry

On 11 Feb 2014, at 12:37, Daniel P. Berrange berra...@redhat.com wrote:

 On Tue, Feb 11, 2014 at 12:13:49PM +0100, Thierry Parmentelat wrote:
 Hello Laine; please see inline — many thanks for the feedback in any case — 
 Thierry
 
 4) Even if you are installing/upgrading libvirt-daemon-config-network
 and the system doesn't already have a default network in place, *if
 libvirt-daemon-config-network package is installed/updated after the
 libvirt-daemon package is installed/updated (i.e. libvirtd has already
 been restarted), then the newly placed default.xml will not be
 recognized until the libvirtd service is again restarted. (actually it
 appears that yum (or maybe rpm) is smart enough to do upgrade the files
 from all packages before running any %post scripts, so that may not be a
 problem).
 
 I value your explanations very much
 however it seems that in our case:
 . this is observed in a test framework, and we run into this problem right 
 after installing for the first time, there’s no upgrading in the loop
 . I should probably have added the extract below to the report
 this is captured at build-time when preparing the image that these nodes 
 will be running 
 as you can see the post install snippet responsible for creating the 
 /etc/libvirt/… stub fails because at that time, the source from 
 /usr/share/libvirt is not available yet
 
  Installing : libvirt-client-1.2.1-0.x86_64
 242/340
  Installing : libvirt-python-1.2.1-0.x86_64
 243/340
 ...
  Installing : libvirt-daemon-1.2.1-0.x86_64
 249/340
  Installing : libvirt-daemon-driver-secret-1.2.1-0.x86_64  
 250/340
  Installing : libvirt-daemon-driver-nodedev-1.2.1-0.x86_64 
 251/340
  Installing : libvirt-daemon-config-network-1.2.1-0.x86_64 
 252/340
 /var/tmp/rpm-tmp.4piryn: line 3: /usr/share/libvirt/networks/default.xml: No 
 such file or directory
 ln: failed to create symbolic link 
 '/etc/libvirt/qemu/networks/autostart/default.xml': No such file or directory
 warning: %post(libvirt-daemon-config-network-1.2.1-0.x86_64) scriptlet 
 failed, exit status 1
 Non-fatal POSTIN scriptlet failure in rpm package 
 libvirt-daemon-config-network-1.2.1-0.x86_64
  Installing : libvirt-daemon-driver-uml-1.2.1-0.x86_64 
 253/340
  Installing : libvirt-daemon-config-nwfilter-1.2.1-0.x86_64
 254/340
  Installing : ebtables-2.0.10-11.fc20.x86_64   
 255/340
  Installing : libvirt-daemon-driver-nwfilter-1.2.1-0.x86_64
 256/340
 ...
  Installing : libvirt-daemon-driver-network-1.2.1-0.x86_64 
 276/340
  Installing : libvirt-daemon-driver-lxc-1.2.1-0.x86_64 
 277/340
 
 Yep, this is pretty clear that we have a missing dep.
 
 libvirt-daemon-config-network Requires libvirt-daemon, which is fine
 when we do *not* have driver modules enabled.
 
 In your case though we do have driver modules enabled, so we must
 add a dep on  libvirt-daemon-driver-network from config-network
 
 Daniel
 -- 
 |: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
 |: http://libvirt.org  -o- http://virt-manager.org :|
 |: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
 |: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] libvirt default network

2014-02-12 Thread Eric Blake
On 02/12/2014 04:41 AM, Thierry Parmentelat wrote:
 Hi again

[Please don't top-post on technical lists]

 
 So we did 2 changes in the specfile that are described below
 This has gone through all our nightlies and all, so that works for us
 
 I’m sorry that I can’t seem to get git send-email to work on my mac 
 (complains about missing perl modules ?!?)

Even if you can't get send-email working, at least using 'git
format-patch' and attaching the patch files to email is easier for
exposing your patches than making people chase URLs.

 Fortunately the changes I did are so simple, I hope you can use the following 
 material
 
 http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=a0e03e6894d8e8486e79531967b92b83d6d59b86
 
 http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=7f0c4d07b5faac3f0fb07cd8240f5ae0e1063560

Thanks!  Not the easiest to get to, but I managed to pull these two
commits into a single patch, by doing:

git fetch git://git.onelab.eu/libvirt.git 1.2.1
git cherry-pick a0e03e
git cherry-pick 7f0c4d
git rebase -i   # and squashing the two into one

Here's the result (I'm not quite sure it is completely correct, but
having it here on list makes for an easier review):


From b4c141b1aa5128c35491eaea13c73508d2bcff01 Mon Sep 17 00:00:00 2001
From: Thierry Parmentelat thierry.parmente...@inria.fr
Date: Tue, 11 Feb 2014 11:35:20 +0100
Subject: [PATCH] spec: add missing dependency for setting up default network

libvirt-daemon-config-network requires libvirt-daemon-driver-network
to ensure the 'default' network is setup properly, when modules
are in use.
---
 libvirt.spec.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index e006f2b..857eb3c 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -420,7 +420,9 @@ Requires: libvirt-daemon-driver-vbox =
%{version}-%{release}
 Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
 %endif

+   %if %{with_interface}
 Requires: libvirt-daemon-driver-interface = %{version}-%{release}
+   %endif
 Requires: libvirt-daemon-driver-secret = %{version}-%{release}
 Requires: libvirt-daemon-driver-storage = %{version}-%{release}
 Requires: libvirt-daemon-driver-network = %{version}-%{release}
@@ -718,6 +720,7 @@ Summary: Default configuration files for the
libvirtd daemon
 Group: Development/Libraries

 Requires: libvirt-daemon = %{version}-%{release}
+Requires: libvirt-daemon-driver-network = %{version}-%{release}

 %description daemon-config-network
 Default configuration files for setting up NAT based networking
-- 
1.8.5.3




-- 
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] libvirt default network

2014-02-12 Thread Daniel P. Berrange
On Wed, Feb 12, 2014 at 06:54:41AM -0700, Eric Blake wrote:
 On 02/12/2014 04:41 AM, Thierry Parmentelat wrote:
  Hi again
 
 [Please don't top-post on technical lists]
 
  
  So we did 2 changes in the specfile that are described below
  This has gone through all our nightlies and all, so that works for us
  
  I’m sorry that I can’t seem to get git send-email to work on my mac 
  (complains about missing perl modules ?!?)
 
 Even if you can't get send-email working, at least using 'git
 format-patch' and attaching the patch files to email is easier for
 exposing your patches than making people chase URLs.
 
  Fortunately the changes I did are so simple, I hope you can use the 
  following material
  
  http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=a0e03e6894d8e8486e79531967b92b83d6d59b86
  
  http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=7f0c4d07b5faac3f0fb07cd8240f5ae0e1063560
 
 Thanks!  Not the easiest to get to, but I managed to pull these two
 commits into a single patch, by doing:
 
 git fetch git://git.onelab.eu/libvirt.git 1.2.1
 git cherry-pick a0e03e
 git cherry-pick 7f0c4d
 git rebase -i   # and squashing the two into one
 
 Here's the result (I'm not quite sure it is completely correct, but
 having it here on list makes for an easier review):
 
 
 From b4c141b1aa5128c35491eaea13c73508d2bcff01 Mon Sep 17 00:00:00 2001
 From: Thierry Parmentelat thierry.parmente...@inria.fr
 Date: Tue, 11 Feb 2014 11:35:20 +0100
 Subject: [PATCH] spec: add missing dependency for setting up default network
 
 libvirt-daemon-config-network requires libvirt-daemon-driver-network
 to ensure the 'default' network is setup properly, when modules
 are in use.
 ---
  libvirt.spec.in | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/libvirt.spec.in b/libvirt.spec.in
 index e006f2b..857eb3c 100644
 --- a/libvirt.spec.in
 +++ b/libvirt.spec.in
 @@ -420,7 +420,9 @@ Requires: libvirt-daemon-driver-vbox =
 %{version}-%{release}
  Requires: libvirt-daemon-driver-nwfilter = %{version}-%{release}
  %endif
 
 + %if %{with_interface}
  Requires: libvirt-daemon-driver-interface = %{version}-%{release}
 + %endif
  Requires: libvirt-daemon-driver-secret = %{version}-%{release}
  Requires: libvirt-daemon-driver-storage = %{version}-%{release}
  Requires: libvirt-daemon-driver-network = %{version}-%{release}
 @@ -718,6 +720,7 @@ Summary: Default configuration files for the
 libvirtd daemon
  Group: Development/Libraries
 
  Requires: libvirt-daemon = %{version}-%{release}
 +Requires: libvirt-daemon-driver-network = %{version}-%{release}

This will need to be conditional on  driver modules being
enabled

Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] libvirt default network

2014-02-12 Thread Laine Stump
On 02/12/2014 03:54 PM, Eric Blake wrote:
 On 02/12/2014 04:41 AM, Thierry Parmentelat wrote:
 Hi again
 [Please don't top-post on technical lists]

 So we did 2 changes in the specfile that are described below
 This has gone through all our nightlies and all, so that works for us

 I’m sorry that I can’t seem to get git send-email to work on my mac 
 (complains about missing perl modules ?!?)
 Even if you can't get send-email working, at least using 'git
 format-patch' and attaching the patch files to email is easier for
 exposing your patches than making people chase URLs.

 Fortunately the changes I did are so simple, I hope you can use the 
 following material

 http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=a0e03e6894d8e8486e79531967b92b83d6d59b86

 http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=7f0c4d07b5faac3f0fb07cd8240f5ae0e1063560
 Thanks!  Not the easiest to get to, but I managed to pull these two
 commits into a single patch,

No need to put them in a single patch - they are for two separate issues.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] libvirt default network

2014-02-12 Thread Eric Blake
On 02/12/2014 07:29 AM, Laine Stump wrote:
 On 02/12/2014 03:54 PM, Eric Blake wrote:
 On 02/12/2014 04:41 AM, Thierry Parmentelat wrote:
 Hi again
 [Please don't top-post on technical lists]

 So we did 2 changes in the specfile that are described below
 This has gone through all our nightlies and all, so that works for us

 I’m sorry that I can’t seem to get git send-email to work on my mac 
 (complains about missing perl modules ?!?)
 Even if you can't get send-email working, at least using 'git
 format-patch' and attaching the patch files to email is easier for
 exposing your patches than making people chase URLs.

 Fortunately the changes I did are so simple, I hope you can use the 
 following material

 http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=a0e03e6894d8e8486e79531967b92b83d6d59b86

 http://git.onelab.eu/?p=libvirt.git;a=commitdiff;h=7f0c4d07b5faac3f0fb07cd8240f5ae0e1063560
 Thanks!  Not the easiest to get to, but I managed to pull these two
 commits into a single patch,
 
 No need to put them in a single patch - they are for two separate issues.

Good point.  ACK to 7f0c4d so I pushed it; and I will shortly post a
revised version for the other issue.

-- 
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] libvirt default network

2014-02-11 Thread Thierry Parmentelat
Hi again

answering my own post, I think I figured it out, as a missing dependency between
. libvirt-daemon-driver-network that provides 
/usr/share/libvirt/networks/default.xml
. and libvirt-daemon-config-network, shose post-install script actually uses 
this same file

So this means that libvirt-daemon-config-network should depend on 
libvirt-daemon-driver-network so that the latter gets installed first
and it seems like on our earlier setups this was working by accident

I’ll need to test this more thoroughly though — Thierry

On 11 Feb 2014, at 09:28, Thierry Parmentelat thierry.parmente...@inria.fr 
wrote:

 Hi
 
 This is in echo to a message originally sent on libvirt-users, but having not 
 received any answer yet so we figured we would try this list instead
 
 So, we use libvirt on various flavours of fedora; with fedora18 we were using 
 libvirt-1.0.4, that we rebuilt using a slightly modified version of 
 mainstream specfile
 Under fedora20 we’ve first tried using the libvirt version that comes with 
 vanilla fedora - 1.1.3 - but are seeing glitches that apparently are fixed in 
 1.2.1, so we’re giving this a shot
 
 The problem we have is, right after installation of our libvirt rpm, the 
 ‘default’ network is not known to the system:
 [root@vnode07 ~]# virsh -c lxc:// net-dumpxml default
 error: failed to get network 'default'
 error: Network not found: no network with matching name ‘default'
 
 While the ‘source’ file for this default network did ship with the rpm
 [root@vnode07 ~]# rpm -qf /usr/share/libvirt/networks/default.xml
 libvirt-daemon-driver-network-1.2.1-0.x86_64
 
 
 What we used to have with 1.0.4 and 1.1.3 at that same point (right after yum 
 install) is
 [root@vnode05 ~]# virsh -c lxc:// net-dumpxml default
 network connections='1510’
 ..
 /network
 
 —
 So, I’m confident we can tweak our specfile to get this to work by adding 
 something like net-define / net-autostart / net-start somewhere near the post 
 install script of the daemon package or something
 
 However we would appreciate some insight as to how this would happen in the 
 first place; is this an intentional change on your end ? 
 or did we screw that up somehow ? if so, I could not find out precisely how 
 this network definition is supposed to take place when the package gets 
 installed, any hint / insight on that would be much appreciated
 
 Thanks in advance 
 
 


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] libvirt default network

2014-02-11 Thread Laine Stump
On 02/11/2014 10:28 AM, Thierry Parmentelat wrote:
 Hi

 This is in echo to a message originally sent on libvirt-users, but having not 
 received any answer yet so we figured we would try this list instead

For this question, either list is appropriate, it's just that nobody has
gotten around to answering the mail sent to libvirt-users (yesterday
afternoon) yet. Since monitoring of the lists is done on a volunteer
basis, that's not uncommon.


 So, we use libvirt on various flavours of fedora; with fedora18 we were using 
 libvirt-1.0.4, that we rebuilt using a slightly modified version of 
 mainstream specfile
 Under fedora20 we’ve first tried using the libvirt version that comes with 
 vanilla fedora - 1.1.3 - but are seeing glitches that apparently are fixed in 
 1.2.1, so we’re giving this a shot

 The problem we have is, right after installation of our libvirt rpm, the 
 ‘default’ network is not known to the system:
 [root@vnode07 ~]# virsh -c lxc:// net-dumpxml default
 error: failed to get network 'default'
 error: Network not found: no network with matching name ‘default'

 While the ‘source’ file for this default network did ship with the rpm
 [root@vnode07 ~]# rpm -qf /usr/share/libvirt/networks/default.xml
 libvirt-daemon-driver-network-1.2.1-0.x86_64

(I had already written a message saying that things hadn't changed in
this area for awhile, but before sending it saw your message pointing
out that /usr/share/libvirt/networks/default.xml was provided by
libvirt-daemon-driver-network, while I had thought it was provided by
libvirt-daemon. So I looked at historic yum provides information and
saw that it *previously* was provided by libvirt-daemon, and is now
provided by libvirt-daemon-driver-network *and* I believe it was *me*
that made this change :-0. It's amazing how much I can forget... Here's
the commit:

commit a13051b2242a32b024811c064ddb10b14f559513
Author: Laine Stump la...@laine.org
Date:   Fri Dec 13 17:03:26 2013 +0200

specfile: fix make rpm when with_driver_modules is 1
   

Aside from the missing dependency you missed in your reply to yourself,
the convoluted nature of the install, and/or difference in behavior
between a fresh install and an upgrade may explain what you're seeing.

During the %install step of an rpm build, the specfile copies the
default network config from /etc/libvirt/qemu/networks/default.xml to
/usr/share/libvirt/networks/default.xml in the rpmbuild install staging
area (See line 1484 in the latest upstream libvirt.spec.in.), and that
file is packaged in the libvirt-daemon-driver-network package (See ~line
1951).  Then during the %post step of an actual install of the
libvirt-daemon-config-network sub-package (~line 1690), *only if there
is currently no file at /etc/libvirt/qemu/networks/default.xml*, the
file in /usr/share/libvirt/networks/default.xml is copied to /etc and a
new uuid is generated and put in the file.

(Note that if you've set the specfile to *not* separately configure
modules, then /usr/share/libvirt/networks/default.xml *is* still
provided by the libvirt-daemon package (which contains libvirt-daemon-*
in that case), handled ~line 1879)

Of course this is just copying the config file - any currently running
libvirtd process will not have been informed of this new file (libvirtd
is well documented to not like having its config files modified behind
its back). So until/unless libvirtd is restarted, this new network won't
be seen.

So there are four possible points where your new default network
definition may not be seen:

1) possibly you aren't installing the libvirt-daemon-config-network
sub-package (until a couple Fedora versions ago, this was a part of the
main libvirt package).

2) Even if you do have libvirt-daemon-config-network installed and are
upgrading libvirt, if a default network is already in place on the
system, an upgrade will not overwrite this existing network.

3) as you've pointed out, possibly you're missing the
libvirt-daemon-driver-network package somehow?

4) Even if you are installing/upgrading libvirt-daemon-config-network
and the system doesn't already have a default network in place, *if
libvirt-daemon-config-network package is installed/updated after the
libvirt-daemon package is installed/updated (i.e. libvirtd has already
been restarted), then the newly placed default.xml will not be
recognized until the libvirtd service is again restarted. (actually it
appears that yum (or maybe rpm) is smart enough to do upgrade the files
from all packages before running any %post scripts, so that may not be a
problem).



 
 What we used to have with 1.0.4 and 1.1.3 at that same point (right after yum 
 install) is

Note that the change in provider for
/usr/share/libvirt/network/default.xml happened sometime after 1.1.3.

 [root@vnode05 ~]# virsh -c lxc:// net-dumpxml default
 network connections='1510’

1510 connections? Wow! That's a lot of guest interfaces! As a matter of
fact, a Linux host bridge can only 

Re: [libvirt] libvirt default network

2014-02-11 Thread Thierry Parmentelat
Hello Laine; please see inline — many thanks for the feedback in any case — 
Thierry

On 11 Feb 2014, at 11:48, Laine Stump la...@laine.org wrote:

 On 02/11/2014 10:28 AM, Thierry Parmentelat wrote:
 Hi
 
 This is in echo to a message originally sent on libvirt-users, but having 
 not received any answer yet so we figured we would try this list instead
 
 For this question, either list is appropriate, it's just that nobody has
 gotten around to answering the mail sent to libvirt-users (yesterday
 afternoon) yet. Since monitoring of the lists is done on a volunteer
 basis, that's not uncommon.

I’m sorry if it sounded like I was blaming or anything, not at all, I perfectly 
understand the delay, it’s just that I was really thinking this was the right 
list and not the -users one. :)

 
 
 So, we use libvirt on various flavours of fedora; with fedora18 we were 
 using libvirt-1.0.4, that we rebuilt using a slightly modified version of 
 mainstream specfile
 Under fedora20 we’ve first tried using the libvirt version that comes with 
 vanilla fedora - 1.1.3 - but are seeing glitches that apparently are fixed 
 in 1.2.1, so we’re giving this a shot
 
 The problem we have is, right after installation of our libvirt rpm, the 
 ‘default’ network is not known to the system:
 [root@vnode07 ~]# virsh -c lxc:// net-dumpxml default
 error: failed to get network 'default'
 error: Network not found: no network with matching name ‘default'
 
 While the ‘source’ file for this default network did ship with the rpm
 [root@vnode07 ~]# rpm -qf /usr/share/libvirt/networks/default.xml
 libvirt-daemon-driver-network-1.2.1-0.x86_64
 
 (I had already written a message saying that things hadn't changed in
 this area for awhile, but before sending it saw your message pointing
 out that /usr/share/libvirt/networks/default.xml was provided by
 libvirt-daemon-driver-network, while I had thought it was provided by
 libvirt-daemon. So I looked at historic yum provides information and
 saw that it *previously* was provided by libvirt-daemon, and is now
 provided by libvirt-daemon-driver-network *and* I believe it was *me*
 that made this change :-0. It's amazing how much I can forget…

yeah, well you’re not alone on that land, unfortunately, and it’s not getting 
any better ;)

 Here's
 the commit:
 
 commit a13051b2242a32b024811c064ddb10b14f559513
 Author: Laine Stump la...@laine.org
 Date:   Fri Dec 13 17:03:26 2013 +0200
 
specfile: fix make rpm when with_driver_modules is 1
 
 
 Aside from the missing dependency you missed in your reply to yourself,
 the convoluted nature of the install, and/or difference in behavior
 between a fresh install and an upgrade may explain what you're seeing.
 
 During the %install step of an rpm build, the specfile copies the
 default network config from /etc/libvirt/qemu/networks/default.xml to
 /usr/share/libvirt/networks/default.xml in the rpmbuild install staging
 area (See line 1484 in the latest upstream libvirt.spec.in.), and that
 file is packaged in the libvirt-daemon-driver-network package (See ~line
 1951).  Then during the %post step of an actual install of the
 libvirt-daemon-config-network sub-package (~line 1690), *only if there
 is currently no file at /etc/libvirt/qemu/networks/default.xml*, the
 file in /usr/share/libvirt/networks/default.xml is copied to /etc and a
 new uuid is generated and put in the file.
 
 (Note that if you've set the specfile to *not* separately configure
 modules, then /usr/share/libvirt/networks/default.xml *is* still
 provided by the libvirt-daemon package (which contains libvirt-daemon-*
 in that case), handled ~line 1879)
 
 Of course this is just copying the config file - any currently running
 libvirtd process will not have been informed of this new file (libvirtd
 is well documented to not like having its config files modified behind
 its back). So until/unless libvirtd is restarted, this new network won't
 be seen.
 
 So there are four possible points where your new default network
 definition may not be seen:
 
 1) possibly you aren't installing the libvirt-daemon-config-network
 sub-package (until a couple Fedora versions ago, this was a part of the
 main libvirt package).
 
 2) Even if you do have libvirt-daemon-config-network installed and are
 upgrading libvirt, if a default network is already in place on the
 system, an upgrade will not overwrite this existing network.
 
 3) as you've pointed out, possibly you're missing the
 libvirt-daemon-driver-network package somehow?
 
 4) Even if you are installing/upgrading libvirt-daemon-config-network
 and the system doesn't already have a default network in place, *if
 libvirt-daemon-config-network package is installed/updated after the
 libvirt-daemon package is installed/updated (i.e. libvirtd has already
 been restarted), then the newly placed default.xml will not be
 recognized until the libvirtd service is again restarted. (actually it
 appears that yum (or maybe rpm) is smart enough to do 

Re: [libvirt] libvirt default network

2014-02-11 Thread Daniel P. Berrange
On Tue, Feb 11, 2014 at 12:13:49PM +0100, Thierry Parmentelat wrote:
 Hello Laine; please see inline — many thanks for the feedback in any case — 
 Thierry
 
  4) Even if you are installing/upgrading libvirt-daemon-config-network
  and the system doesn't already have a default network in place, *if
  libvirt-daemon-config-network package is installed/updated after the
  libvirt-daemon package is installed/updated (i.e. libvirtd has already
  been restarted), then the newly placed default.xml will not be
  recognized until the libvirtd service is again restarted. (actually it
  appears that yum (or maybe rpm) is smart enough to do upgrade the files
  from all packages before running any %post scripts, so that may not be a
  problem).
 
 I value your explanations very much
 however it seems that in our case:
 . this is observed in a test framework, and we run into this problem right 
 after installing for the first time, there’s no upgrading in the loop
 . I should probably have added the extract below to the report
 this is captured at build-time when preparing the image that these nodes will 
 be running 
 as you can see the post install snippet responsible for creating the 
 /etc/libvirt/… stub fails because at that time, the source from 
 /usr/share/libvirt is not available yet
 
   Installing : libvirt-client-1.2.1-0.x86_64
 242/340
   Installing : libvirt-python-1.2.1-0.x86_64
 243/340
 ...
   Installing : libvirt-daemon-1.2.1-0.x86_64
 249/340
   Installing : libvirt-daemon-driver-secret-1.2.1-0.x86_64  
 250/340
   Installing : libvirt-daemon-driver-nodedev-1.2.1-0.x86_64 
 251/340
   Installing : libvirt-daemon-config-network-1.2.1-0.x86_64 
 252/340
 /var/tmp/rpm-tmp.4piryn: line 3: /usr/share/libvirt/networks/default.xml: No 
 such file or directory
 ln: failed to create symbolic link 
 '/etc/libvirt/qemu/networks/autostart/default.xml': No such file or directory
 warning: %post(libvirt-daemon-config-network-1.2.1-0.x86_64) scriptlet 
 failed, exit status 1
 Non-fatal POSTIN scriptlet failure in rpm package 
 libvirt-daemon-config-network-1.2.1-0.x86_64
   Installing : libvirt-daemon-driver-uml-1.2.1-0.x86_64 
 253/340
   Installing : libvirt-daemon-config-nwfilter-1.2.1-0.x86_64
 254/340
   Installing : ebtables-2.0.10-11.fc20.x86_64   
 255/340
   Installing : libvirt-daemon-driver-nwfilter-1.2.1-0.x86_64
 256/340
 ...
   Installing : libvirt-daemon-driver-network-1.2.1-0.x86_64 
 276/340
   Installing : libvirt-daemon-driver-lxc-1.2.1-0.x86_64 
 277/340

Yep, this is pretty clear that we have a missing dep.

libvirt-daemon-config-network Requires libvirt-daemon, which is fine
when we do *not* have driver modules enabled.

In your case though we do have driver modules enabled, so we must
add a dep on  libvirt-daemon-driver-network from config-network

Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list