/etc/dnsmasq.d-available/lxc circular link

Bug #1157332 reported by Seth Arnold
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
High
Serge Hallyn
Quantal
Fix Released
High
Serge Hallyn
Raring
Fix Released
High
Serge Hallyn
lxc (Ubuntu)
Fix Released
High
Stéphane Graber
Quantal
Fix Released
High
Stéphane Graber
Raring
Fix Released
High
Stéphane Graber
network-manager (Ubuntu)
Won't Fix
High
Unassigned
Quantal
Won't Fix
High
Mathieu Trudel-Lapierre
Raring
Won't Fix
High
Mathieu Trudel-Lapierre

Bug Description

= Rational =
We pushed a custom dnsmasq hook to precise, quantal and raring over the past few months to avoid conflicts for people running the dnsmasq system daemon (non-default).
However because we introduced this change as SRU, it's causing problems when then upgrading to the next release by having the migration code get executed multiple times.
We need to fix this and repare broken systems in the process.

= Test case =
 - Install any of the current lxc, libvirt-bin or network-manager on Ubuntu 12.04 or 12.10
 - Dist-upgrade to the next version of Ubuntu
 - You'll notice /etc/dnsmasq.d-available/FILE is now a circular link, /etc/dnsmasq.d/FILE no longer exists and the old content is moved to /etc/dnsmasq.d-available/FILE.dpkg-new (where FILE is lxc, dnsmasq or network-manager)
 - Updating to a fixed package will move everything back into place (assuming the user hasn't done any local change in between, in which case, nothing will be done)

= Regression potential =
I have tested the change doing precise -> quantal -> raring and quantal -> raring and I'm confident the new postinst hook will fix any breakage. It's also specific enough to only trigger in the specific case we know how to repair. In all other cases, we keep the system as-is and let the user deal with it. As a result, it's not impossible that some weird corner cases (for example when removing/purging the package in between dist-upgrades) may go unfixed but I'm confident we'll cover at least 99% of the cases with the fix and that this fix is safe.

--- Original bug report ---
In today's Raring apt-get dist-upgrade:

Setting up lxc (0.9.0~rc1-0ubuntu1) ...
Installing new version of config file /etc/apparmor.d/lxc/lxc-default-with-nesting ...
dpkg: warning: lxc: config file '/etc/dnsmasq.d-available/lxc' is a circular link
 (= '/etc/dnsmasq.d-available/lxc')

Related branches

Revision history for this message
Seth Arnold (seth-arnold) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

I'm looking into this.

Changed in lxc (Ubuntu):
assignee: nobody → Stéphane Graber (stgraber)
Changed in lxc (Ubuntu):
status: New → Incomplete
Revision history for this message
Stéphane Graber (stgraber) wrote :

I've not been able to reproduce this issue and it's unclear whether it'd still affect new users or was only a temporary glitch while we were fixing the dnsmasq config handling.

I'm marking this incomplete for now in the hope that someone can produce a step by step procedure to trigger this.

Revision history for this message
Kevin Shenk (batonac) wrote :

I'm not sure exactly how to reproduce this, but I've got the same error message while doing an apt-get dist-upgrade on raring ~ 5 minutes ago.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1157332] Re: /etc/dnsmasq.d-available/lxc circular link

Thanks for the info, Kevin.

 status: confirmed
 importance: high

Changed in lxc (Ubuntu):
importance: Undecided → High
status: Incomplete → Confirmed
Revision history for this message
Stéphane Graber (stgraber) wrote :

Ok, I'll try to get to the bottom of this today.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Alright, I figured it out and wrote a patch for it.
Now here's the boring explanation for all that mess.

We introduced the dnsmasq hook in LXC in quantal, then fixed it to use dpkg-maintscripts as an SRU.
We then subsequently SRUed the whole thing to precise and we pushed the new version to raring.

That means in short that the migration code needs to fire if the previous version is:
 - < "0.7.5-3ubuntu67" on precise
 - < "0.8.0~rc1-4ubuntu39.12.10.2" on quantal
 - < "0.8.0~rc1-4ubuntu49" on raring

This means we can't do the obvious thing of putting "0.7.5-3ubuntu67" in lxc.maintscripts as someone can have a machine with the base quantal version, then upgrade to raring and not get the migration done. Similar thing can happen with someone upgrading from an early raring image.

As a result, I think it's best to have the base version for each series set in lxc.maintscripts as one would expect if it wasn't for the mess we created with all the SRUs and then have some extra logic in the postinst to detect the mess created by multiple migrations and fix it all up for the user.

I'm attaching the suggested patch for this issue, which I tested in a standard fully-up-to-date-quantal to current-raring update scenario.

Revision history for this message
Stéphane Graber (stgraber) wrote :
Revision history for this message
Stéphane Graber (stgraber) wrote :

Alright, assigned the various tasks to the usual suspects. I'm doing one last series of test on LXC and I'll upload the LXC fix.

Changed in libvirt (Ubuntu Quantal):
status: New → Triaged
Changed in libvirt (Ubuntu Raring):
status: New → Triaged
Changed in lxc (Ubuntu Quantal):
status: New → Triaged
Changed in lxc (Ubuntu Raring):
status: Confirmed → Triaged
Changed in network-manager (Ubuntu Quantal):
status: New → Triaged
Changed in network-manager (Ubuntu Raring):
status: New → Triaged
Changed in libvirt (Ubuntu Quantal):
importance: Undecided → High
Changed in libvirt (Ubuntu Raring):
importance: Undecided → High
Changed in lxc (Ubuntu Quantal):
assignee: nobody → Stéphane Graber (stgraber)
importance: Undecided → High
Changed in libvirt (Ubuntu Quantal):
assignee: nobody → Serge Hallyn (serge-hallyn)
Changed in libvirt (Ubuntu Raring):
assignee: nobody → Serge Hallyn (serge-hallyn)
Changed in network-manager (Ubuntu Quantal):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
importance: Undecided → High
Changed in network-manager (Ubuntu Raring):
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
importance: Undecided → High
tags: added: patch
description: updated
Changed in lxc (Ubuntu Quantal):
status: Triaged → In Progress
Changed in lxc (Ubuntu Raring):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.9.0~rc1-0ubuntu3

---------------
lxc (0.9.0~rc1-0ubuntu3) raring; urgency=low

  * Add code to postinst to fix any double-migration of /etc/dnsmasq.
    (LP: #1157332)
 -- Stephane Graber <email address hidden> Wed, 27 Mar 2013 16:51:11 -0400

Changed in lxc (Ubuntu Raring):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.0.2-0ubuntu10

---------------
libvirt (1.0.2-0ubuntu10) raring; urgency=low

  * Add code to postinst to fix any double-migration of /etc/dnsmasq.
    (LP: #1157332)
 -- Serge Hallyn <email address hidden> Thu, 28 Mar 2013 09:11:04 -0500

Changed in libvirt (Ubuntu Raring):
status: Triaged → Fix Released
Changed in libvirt (Ubuntu Quantal):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Seth, or anyone else affected,

Accepted libvirt into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libvirt/0.9.13-0ubuntu12.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
tags: added: verification-needed
removed: verification-done
Revision history for this message
Seth Arnold (seth-arnold) wrote :

I tested libvirt-bin on quantal: the current archive version does not properly re-create /etc/dnsmasq.d/libvirt-bin symbolic link when installed, uninstalled, and re-installed.

The -proposed version does properly re-create the /etc/dnsmasq.d/libvirt-bin symbolic link.

(Ignore the verification-done -> -needed -> -done toggling; I mis-read my terminal's scrollback when transcribing details here.)

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Seth, or anyone else affected,

Accepted lxc into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/lxc/0.8.0~rc1-4ubuntu39.12.10.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lxc (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 0.9.13-0ubuntu12.3

---------------
libvirt (0.9.13-0ubuntu12.3) quantal-proposed; urgency=low

  * put libvirt-bin dnsmasq file into /etc/dnsmasq.d-available, and
    create a symlink in /etc/dnsmasq.d, to avoid problems when removing
    and re-installing libvirt-bin. (LP: #1113821)
  * Add code to postinst to fix any double-migration of /etc/dnsmasq.
    (LP: #1157332)
  * debian/libvirt-bin.{dirs,install}: install dnsmasq.d-available/libvirt-bin
 -- Serge Hallyn <email address hidden> Tue, 16 Apr 2013 07:11:17 -0500

Changed in libvirt (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
mkovac (mkovac) wrote :

I've just installed lxc (0.8.0~rc1-4ubuntu39.12.10.2~ubuntu12.04.1) from precise-backports and got the same circular link warning. Will the package in backports get fixed?

Revision history for this message
Stéphane Graber (stgraber) wrote :

We are looking into backporting 1.0.0~alpha1 to precise-backports which will contain the needed fix.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

quantal package looks good.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.8.0~rc1-4ubuntu39.12.10.3

---------------
lxc (0.8.0~rc1-4ubuntu39.12.10.3) quantal-proposed; urgency=low

  * Add code to postinst to fix any double-migration of /etc/dnsmasq.
    (LP: #1157332)
 -- Stephane Graber <email address hidden> Wed, 27 Mar 2013 16:55:17 -0400

Changed in lxc (Ubuntu Quantal):
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

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

Changed in network-manager (Ubuntu Quantal):
status: Triaged → Won't Fix
Revision history for this message
Rolf Leggewie (r0lf) wrote :

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
Revision history for this message
Aron Xu (happyaron) wrote :

We're dropping dnsmasq from default, marking as Won't Fix in network-manager.

Changed in network-manager (Ubuntu):
assignee: Mathieu Trudel-Lapierre (cyphermox) → nobody
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.