← Back to team overview

touch-packages team mailing list archive

[Bug 1113821] Re: libvirt-bin deletes /etc/dnsmasq.d/libvirt-bin on upgrade

 

raring has seen the end of its life and is no longer receiving any
updates. Marking the raring task for this ticket as "Won't Fix".

** Changed in: network-manager (Ubuntu Raring)
       Status: Triaged => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1113821

Title:
  libvirt-bin deletes /etc/dnsmasq.d/libvirt-bin on upgrade

Status in libvirt package in Ubuntu:
  Fix Released
Status in lxc package in Ubuntu:
  Fix Released
Status in network-manager package in Ubuntu:
  Triaged
Status in libvirt source package in Precise:
  Fix Released
Status in lxc source package in Precise:
  Fix Released
Status in network-manager source package in Precise:
  Triaged
Status in libvirt source package in Quantal:
  Fix Released
Status in lxc source package in Quantal:
  Fix Released
Status in network-manager source package in Quantal:
  Won't Fix
Status in libvirt source package in Raring:
  Fix Released
Status in lxc source package in Raring:
  Fix Released
Status in network-manager source package in Raring:
  Won't Fix

Bug description:
  == Rationale ==
  Back in quantal we introduced a new /etc/dnsmasq.d/<package>.

  That file is meant to avoid conflicts between the various dnsmasq
  daemons and a main system wide dnsmasq (as provided by the dnsmasq
  package).

  Unfortunately the design of the /etc/dnsmasq.d/<package> logic had one flaw.
  To allow restoring the original dnsmasq behaviour as quickly as possible, we put the removal of that file in the remove target of the postrm, which means that if removing and then reinstalling the package, the file would vanish.

  The new implementation uses a separate /etc/dnsmasq.d-available
  directory which contains standard conffiles (only removed on purge)
  and we now have postinst and postrm hooks to create/remove symlinks
  from /etc/dnsmasq.d-available/<package> to /etc/dnsmasq.d/<package>.

  == Test case ==
  1) Install current version from the archive
  2) Remove it
  3) Install it again
  4) Confirm that the file in /etc/dnsmasq.d disappeared (that's the bug)
  5) dpkg --purge <package>
  6) Reinstall the current version from the archive
  7) Update to the version from -proposed
  8) Check that /etc/dnsmasq.d/<package> is now a symlink to /etc/dnsmasq.d-available/<package>. You may also want to check with some extra changes in the file prior to upgrade to confirm that it's being moved properly.

  == Regression potential ==
  It's not the simplest conffile handling code you can think of and it's possible we missed something, though in testing, the solution appears reliable, properly transitions any user made change and allows for the user to remove the conffile if they wish.
  If something goes completely wrong, the worst we can end up with is a missing configuration (what we have currently anyway) or a configuration file where it was previously removed by the user.
  It's worth noting however that most of our users don't have the system wide dnsmasq daemon installed and those who do, typically want that configuration file anyway (or they'll get quite a mess at boot time), so I consider the risk to be minimal here.

  ------ original report -------

  libvirt-bin deletes its own NON-obsolete conffile /etc/dnsmasq.d
  /libvirt-bin in its postrm with "rm", but postrm runs on upgrade, so
  this causes libvirt-bin to delete its own conffile on upgrade. Hence,
  anything that relies on /etc/dnsmasq.d/libvirt-bin will break whenever
  upgrading libvirt-bin to a newer version.

  libvirt-bin probably should use dpkg-maintscript-helper rm_conffile.

  Repro steps:

  1) Install latest version of libvirt-bin. Observe that /etc/dnsmasq.d/libvirt-bin is present.
  2) Purge libvirt-bin and install an old version. Observe that /etc/dnsmasq.d/libvirt-bin is present.
  3) Upgrade libvirt-bit to latest version. Observe that /etc/dnsmasq.d/libvirt-bin is gone.

  Expected:

  /etc/dnsmasq.d/libvirt-bin should be present on disk after each step,
  since it is shipped in both versions of the package.

  Actual:

  /etc/dnsmasq.d/libvirt-bin is gone after step 3.

  $ sudo apt-get install libvirt-bin
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following extra packages will be installed:
    augeas-lenses bridge-utils cgroup-lite ebtables gawk libaugeas0 libnetcf1
    libsigsegv2 libvirt0 libxenstore3.0
  Suggested packages:
    augeas-doc gawk-doc augeas-tools qemu-kvm qemu radvd lvm2
  The following NEW packages will be installed:
    augeas-lenses bridge-utils cgroup-lite ebtables gawk libaugeas0 libnetcf1
    libsigsegv2 libvirt-bin libvirt0 libxenstore3.0
  0 upgraded, 11 newly installed, 0 to remove and 65 not upgraded.
  Need to get 5,061 kB of archives.
  After this operation, 17.2 MB of additional disk space will be used.
  Do you want to continue [Y/n]? Y
  Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/main augeas-lenses all 0.10.0-1fakesync1ubuntu1 [179 kB]
  Get:2 http://us.archive.ubuntu.com/ubuntu/ quantal/main bridge-utils amd64 1.5-4ubuntu2 [32.5 kB]
  Get:3 http://us.archive.ubuntu.com/ubuntu/ quantal/main ebtables amd64 2.0.9.2-2ubuntu3 [90.3 kB]
  Get:4 http://us.archive.ubuntu.com/ubuntu/ quantal/main libsigsegv2 amd64 2.9-4ubuntu3 [14.7 kB]
  Get:5 http://us.archive.ubuntu.com/ubuntu/ quantal/main gawk amd64 1:4.0.1+dfsg-2 [778 kB]
  Get:6 http://us.archive.ubuntu.com/ubuntu/ quantal/main libaugeas0 amd64 0.10.0-1fakesync1ubuntu1 [176 kB]
  Get:7 http://us.archive.ubuntu.com/ubuntu/ quantal/main libnetcf1 amd64 0.2.0-1ubuntu1 [51.6 kB]
  Get:8 http://us.archive.ubuntu.com/ubuntu/ quantal-updates/main libvirt0 amd64 0.9.13-0ubuntu12.2 [880 kB]
  Get:9 http://us.archive.ubuntu.com/ubuntu/ quantal-updates/main libxenstore3.0 amd64 4.1.3-3ubuntu1.2 [19.8 kB]
  Get:10 http://us.archive.ubuntu.com/ubuntu/ quantal/main cgroup-lite all 1.5 [3,944 B]
  Get:11 http://us.archive.ubuntu.com/ubuntu/ quantal-updates/main libvirt-bin amd64 0.9.13-0ubuntu12.2 [2,836 kB]
  Fetched 5,061 kB in 4s (1,029 kB/s)
  Selecting previously unselected package augeas-lenses.
  (Reading database ... 399268 files and directories currently installed.)
  Unpacking augeas-lenses (from .../augeas-lenses_0.10.0-1fakesync1ubuntu1_all.deb) ...
  Selecting previously unselected package bridge-utils.
  Unpacking bridge-utils (from .../bridge-utils_1.5-4ubuntu2_amd64.deb) ...
  Selecting previously unselected package ebtables.
  Unpacking ebtables (from .../ebtables_2.0.9.2-2ubuntu3_amd64.deb) ...
  Selecting previously unselected package libsigsegv2.
  Unpacking libsigsegv2 (from .../libsigsegv2_2.9-4ubuntu3_amd64.deb) ...
  Selecting previously unselected package gawk.
  Unpacking gawk (from .../gawk_1%3a4.0.1+dfsg-2_amd64.deb) ...
  Selecting previously unselected package libaugeas0.
  Unpacking libaugeas0 (from .../libaugeas0_0.10.0-1fakesync1ubuntu1_amd64.deb) ...
  Selecting previously unselected package libnetcf1.
  Unpacking libnetcf1 (from .../libnetcf1_0.2.0-1ubuntu1_amd64.deb) ...
  Selecting previously unselected package libvirt0.
  Unpacking libvirt0 (from .../libvirt0_0.9.13-0ubuntu12.2_amd64.deb) ...
  Selecting previously unselected package libxenstore3.0.
  Unpacking libxenstore3.0 (from .../libxenstore3.0_4.1.3-3ubuntu1.2_amd64.deb) ...
  Selecting previously unselected package cgroup-lite.
  Unpacking cgroup-lite (from .../cgroup-lite_1.5_all.deb) ...
  Selecting previously unselected package libvirt-bin.
  Unpacking libvirt-bin (from .../libvirt-bin_0.9.13-0ubuntu12.2_amd64.deb) ...
  Processing triggers for man-db ...
  Processing triggers for ureadahead ...
  ureadahead will be reprofiled on next reboot
  Setting up augeas-lenses (0.10.0-1fakesync1ubuntu1) ...
  Setting up bridge-utils (1.5-4ubuntu2) ...
  Setting up ebtables (2.0.9.2-2ubuntu3) ...
  Setting up libsigsegv2 (2.9-4ubuntu3) ...
  Setting up gawk (1:4.0.1+dfsg-2) ...
  Setting up libaugeas0 (0.10.0-1fakesync1ubuntu1) ...
  Setting up libnetcf1 (0.2.0-1ubuntu1) ...
  Setting up libvirt0 (0.9.13-0ubuntu12.2) ...
  Setting up libxenstore3.0 (4.1.3-3ubuntu1.2) ...
  Setting up cgroup-lite (1.5) ...
  cgroup-lite start/running
  Processing triggers for ureadahead ...
  Setting up libvirt-bin (0.9.13-0ubuntu12.2) ...
  Adding group `libvirtd' (GID 132) ...
  Done.
  libvirt-bin start/running, process 8181
  Processing triggers for libc-bin ...
  ldconfig deferred processing now taking place
  Processing triggers for ureadahead ...
  $ ls -al /etc/dnsmasq.d/libvirt-bin
  -rw-r--r-- 1 root root 40 Jan 28 13:14 /etc/dnsmasq.d/libvirt-bin
  $ sudo apt-get remove libvirt-bin
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    augeas-lenses bridge-utils cgroup-lite ebtables libaugeas0 libnetcf1
    libvirt0 libxenstore3.0
  Use 'apt-get autoremove' to remove them.
  The following packages will be REMOVED:
    libvirt-bin
  0 upgraded, 0 newly installed, 1 to remove and 65 not upgraded.
  After this operation, 9,947 kB disk space will be freed.
  Do you want to continue [Y/n]? Y
  (Reading database ... 399856 files and directories currently installed.)
  Removing libvirt-bin ...
  libvirt-bin stop/waiting
  Processing triggers for ureadahead ...
  Processing triggers for man-db ...
  $ ls -al /etc/dnsmasq.d/libvirt-bin
  ls: cannot access /etc/dnsmasq.d/libvirt-bin: No such file or directory
  $ sudo apt-get purge libvirt-bin
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following packages were automatically installed and are no longer required:
    augeas-lenses bridge-utils cgroup-lite ebtables libaugeas0 libnetcf1
    libvirt0 libxenstore3.0
  Use 'apt-get autoremove' to remove them.
  The following packages will be REMOVED:
    libvirt-bin*
  0 upgraded, 0 newly installed, 1 to remove and 65 not upgraded.
  After this operation, 0 B of additional disk space will be used.
  Do you want to continue [Y/n]? Y
  (Reading database ... 399765 files and directories currently installed.)
  Removing libvirt-bin ...
  Purging configuration files for libvirt-bin ...
  /usr/sbin/delgroup: `libvirt-dnsmasq' still has `libvirtd' as their primary group!
  dpkg: warning: while removing libvirt-bin, directory '/var/lib/libvirt/qemu' not empty so not removed
  dpkg: warning: while removing libvirt-bin, directory '/etc/libvirt/qemu/networks/autostart' not empty so not removed
  Processing triggers for ureadahead ...
  $ sudo apt-get install libvirt-bin=0.9.13-0ubuntu12 libvirt0=0.9.13-0ubuntu12
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  Suggested packages:
    qemu-kvm qemu radvd lvm2
  The following NEW packages will be installed:
    libvirt-bin
  The following packages will be DOWNGRADED:
    libvirt0
  0 upgraded, 1 newly installed, 1 downgraded, 0 to remove and 65 not upgraded.
  Need to get 3,719 kB of archives.
  After this operation, 9,944 kB of additional disk space will be used.
  Do you want to continue [Y/n]? Y
  Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/main libvirt0 amd64 0.9.13-0ubuntu12 [880 kB]
  Get:2 http://us.archive.ubuntu.com/ubuntu/ quantal/main libvirt-bin amd64 0.9.13-0ubuntu12 [2,839 kB]
  Fetched 3,719 kB in 3s (974 kB/s)
  dpkg: warning: downgrading libvirt0 from 0.9.13-0ubuntu12.2 to 0.9.13-0ubuntu12
  (Reading database ... 399717 files and directories currently installed.)
  Preparing to replace libvirt0 0.9.13-0ubuntu12.2 (using .../libvirt0_0.9.13-0ubuntu12_amd64.deb) ...
  Unpacking replacement libvirt0 ...
  Selecting previously unselected package libvirt-bin.
  Unpacking libvirt-bin (from .../libvirt-bin_0.9.13-0ubuntu12_amd64.deb) ...
  Processing triggers for man-db ...
  Processing triggers for ureadahead ...
  Setting up libvirt0 (0.9.13-0ubuntu12) ...
  Setting up libvirt-bin (0.9.13-0ubuntu12) ...
  libvirt-bin start/running, process 11373
  Processing triggers for libc-bin ...
  ldconfig deferred processing now taking place
  Processing triggers for ureadahead ...
  $ ls -al /etc/dnsmasq.d/libvirt-bin
  -rw-r--r-- 1 root root 40 Oct  5 17:58 /etc/dnsmasq.d/libvirt-bin
  $ sudo apt-get install libvirt-bin
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following extra packages will be installed:
    libvirt0
  Suggested packages:
    qemu-kvm qemu radvd lvm2
  The following packages will be upgraded:
    libvirt-bin libvirt0
  2 upgraded, 0 newly installed, 0 to remove and 65 not upgraded.
  Need to get 0 B/3,716 kB of archives.
  After this operation, 3,072 B of additional disk space will be used.
  Do you want to continue [Y/n]? Y
  (Reading database ... 399857 files and directories currently installed.)
  Preparing to replace libvirt-bin 0.9.13-0ubuntu12 (using .../libvirt-bin_0.9.13-0ubuntu12.2_amd64.deb) ...
  libvirt-bin stop/waiting
  Unpacking replacement libvirt-bin ...
  Preparing to replace libvirt0 0.9.13-0ubuntu12 (using .../libvirt0_0.9.13-0ubuntu12.2_amd64.deb) ...
  Unpacking replacement libvirt0 ...
  Processing triggers for man-db ...
  Processing triggers for ureadahead ...
  Setting up libvirt0 (0.9.13-0ubuntu12.2) ...
  Setting up libvirt-bin (0.9.13-0ubuntu12.2) ...
  libvirt-bin start/running, process 13043
  Processing triggers for libc-bin ...
  ldconfig deferred processing now taking place
  $ ls -al /etc/dnsmasq.d/libvirt-bin
  ls: cannot access /etc/dnsmasq.d/libvirt-bin: No such file or directory
  $ ubuntu-bug libvirt-bin

  ProblemType: Bug
  DistroRelease: Ubuntu 12.10
  Package: libvirt-bin 0.9.13-0ubuntu12.2
  ProcVersionSignature: Ubuntu 3.5.0-22.34-generic 3.5.7.2
  Uname: Linux 3.5.0-22-generic x86_64
  NonfreeKernelModules: nvidia
  ApportVersion: 2.6.1-0ubuntu9
  Architecture: amd64
  Date: Sat Feb  2 14:14:06 2013
  InstallationDate: Installed on 2011-04-30 (644 days ago)
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
  KernLog:

  MarkForUpload: True
  SourcePackage: libvirt
  UpgradeStatus: Upgraded to quantal on 2012-10-21 (104 days ago)
  modified.conffile..etc.dnsmasq.d.libvirt.bin: [deleted]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1113821/+subscriptions