Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 451168 - app-emulation/libvirt-1.0.1 removes existing "/etc/libvirt/qemu/networks/default.xml" file
Summary: app-emulation/libvirt-1.0.1 removes existing "/etc/libvirt/qemu/networks/defa...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-10 11:31 UTC by Delete ME
Modified: 2013-01-13 12:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/etc/libvirt/qemu/networks/default.xml file (default.xml,282 bytes, application/xml)
2013-01-10 11:32 UTC, Delete ME
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Delete ME 2013-01-10 11:31:00 UTC
The new libvirt-1.0.1 version in portage removes the existing "/etc/libvirt/qemu/networks/default.xml" file if updating from libvirt-1.0.0. This leads to an issue when starting VM's. This will result in a network related error message and the VM's don't start.

...
[Do, 10 Jan 2013 11:06:37 virt-manager 12029] DEBUG (error:80) dialog message: Error starting domain: Netzwerk nicht gefunden: Kein Netzwerk mit übereinstimmendem Namen »default« : Error starting domain: Netzwerk nicht gefunden: Kein Netzwerk mit übereinstimmendem Namen »default«

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 117, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/domain.py", line 1090, in startup
    self._backend.create()
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 681, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Netzwerk nicht gefunden: Kein Netzwerk mit übereinstimmendem Namen »default«
...

- the real file "/etc/libvirt/qemu/networks/default.xml" will be removed
- the symlink "/etc/libvirt/qemu/networks/autostart/default.xml" will be kept
- an except of the emerge process

...
-- replaced obj /etc/logrotate.d/libvirtd.uml
--- replaced obj /etc/logrotate.d/libvirtd.qemu
--- replaced obj /etc/logrotate.d/libvirtd.lxc
--- replaced obj /etc/logrotate.d/libvirtd
--- replaced dir /etc/logrotate.d
<<<          obj /etc/libvirt/qemu/networks/default.xml
--- replaced sym /etc/libvirt/qemu/networks/autostart/default.xml
--- replaced dir /etc/libvirt/qemu/networks/autostart
--- replaced dir /etc/libvirt/qemu/networks
--- replaced obj /etc/libvirt/qemu.conf
...

- this is strange because the relevant code in the ebuild exists in the libvirt-1.0.0 ebuild too

...
350 	pkg_preinst() {
351 	# we only ever want to generate this once
352 	if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
353 	rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
354 	fi
...

- the workaround is to put the default.xml from back into "/etc/libvirt/qemu/networks/" directory

Reproducible: Always

Steps to Reproduce:
1. existing libvirt-1.0.0 install
2. update to libvirt-1.0.1
3. try to start an VM
Actual Results:  
"/etc/libvirt/qemu/networks/default.xml" file will be removed during libvirt-1.0.1 update

Expected Results:  
"/etc/libvirt/qemu/networks/default.xml" file will be kept during libvirt-1.0.1 update

box ~ # emerge --info
Portage 2.1.11.31 (hardened/linux/amd64, gcc-4.5.4, glibc-2.15-r3, 3.7.1-hardened-r2-v1 x86_64)
=================================================================
System uname: Linux-3.7.1-hardened-r2-v1-x86_64-Intel-R-_Core-TM-_i7-3770T_CPU_@_2.50GHz-with-gentoo-2.1
Timestamp of tree: Thu, 10 Jan 2013 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mcx16 -msahf -maes -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=core2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC=""
USE="X aac acl acpi alsa amd64 apng bash-completion berkdb branding bzip2 cairo cdr clamav clamdtop cli consolekit cracklib crypt css curl cxx dbus device-mapper dhcpcd dri dts dvd dvdr encode exif expat extras ffmpeg fftw flac fontconfig ftp gdbm gdu gif git gnutls gphoto2 gpm gsm gtk gtkhtml gudev gzip hardened hwdb iconv icu idn ieee1394 imagemagick imap imlib ipc ipv6 iscsi java javascript jpeg jpeg2k justify kvm lame libkms libnotify llvm lm_sensors lock lvm lzma lzo mad mem-scramble memlimit mime mmap mmx mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib natspec ncurses networkmanager nfs nls nptl nsplugin ogg openal opengl openmp pam pax_kernel pcre pdf pdfimport perl pkcs11 png policykit posix postscript ppp pppd python qemu quicktime rar raw rdesktop readline sdl session sharedmem smartcard smp sna sockets socks5 sound speex sse sse2 sse3 sse4 sse4_1 ssl ssse3 startup-notification subversion svg syslog-ng szip tcpd theora threads thunar tiff tls truetype udev unicode urandom usb vaapi virt-network virtfs vnc vorbis webm wmf x264 xattr xft xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


box ~ # emerge -pav libvirt

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ~] app-emulation/libvirt-1.0.1  USE="caps iscsi libvirtd lvm lxc macvtap nfs nls policykit python qemu udev vepa virt-network -audit -avahi -debug -firewalld -numa -openvz -parted -pcap -phyp -rbd -sasl (-selinux) -uml -virtualbox -xen" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
Comment 1 Delete ME 2013-01-10 11:32:07 UTC
Created attachment 335050 [details]
/etc/libvirt/qemu/networks/default.xml file

/etc/libvirt/qemu/networks/default.xml file attached
Comment 2 Zac Medico gentoo-dev 2013-01-11 16:46:37 UTC
Maybe use find -exec touch, like savedconfig.eclass for bug #396169:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.19&r2=1.20
Comment 3 Doug Goldstein (RETIRED) gentoo-dev 2013-01-12 03:38:30 UTC
Try to re-emerge, I've applied Zac's suggestion. You'll need to emerge it twice to check. emerge -1 libvirt && emerge -1 libvirt
Comment 4 Delete ME 2013-01-13 12:08:18 UTC
- portage tree updated + libvirt reemerged 2 times
- both times the "/etc/libvirt/qemu/networks/default.xml" file was kept
- so the issue is solved

Thank you for your help