[Libvir] RPM upgrades interaction with default networking

Richard W.M. Jones rjones at redhat.com
Wed Mar 14 09:23:37 UTC 2007

Daniel P. Berrange wrote:
> On Tue, Mar 13, 2007 at 07:48:11PM -0700, David Lutterkort wrote:
>> On Tue, 2007-03-13 at 23:22 +0000, Daniel P. Berrange wrote:
>>> When we build an RPM we also include the default.xml file in the 
>>> /etc/libvirt/qemu/networks directory, as well as the autostart symlink.
>>> So anyone installing the libvirt RPM gets the default network, whether
>>> they're doing an upgrade or fresh install.  This is reasonable for the
>>> new install, or the first time you upgrade to a new neworking-enabled
>>> libvirt. If you subsequently delete the default network, or turn off
>>> autostarting, then along comes the next libvirt RPM update and autostart
>>> gets turned back on, and/or the default network recreated.
>> Have you tried how rpm reacts to a %config(noreplace) for those files ?
>> I am not sure how it deals with file deletions, but for files changed by
>> the user, it properly creates the new file as .rpmnew (and some people
>> actually have scripts to help them reconcile the rpmnew files with their
>> changes, interactively, of course)
> The deletion of files is unfortunately the most important bit - and as
> far as my testing has seen, no matter what you annotate with, if you 
> delete a file it will always get re-created upon upgrade :-(

I can't find an example of default.xml in CVS, so I may be talking 
through my hat, but some suggestions:

(1) Allow the default network to be disabled by editing the default.xml 
file, eg:

  <networks disabled='true'>

(2) Put a big comment at the top of the file saying:

   <!-- to disable default network, rename this file to 
default.xml.disabled -->

and then explicitly check for this in %post before trying to reinstall 
the default.xml file.


Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
  "[Negative numbers] darken the very whole doctrines of the equations
  and make dark of the things which are in their nature excessively
  obvious and simple" (Francis Maseres FRS, mathematician, 1759)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070314/2201b88c/attachment-0001.bin>

More information about the libvir-list mailing list