[Bug 1021416] [NEW] lxc-clone shouldn't be messing with dhclient.conf, causes conffile upgrade prompts on quantal

Stéphane Graber stgraber at stgraber.org
Thu Jul 5 18:02:50 UTC 2012


Public bug reported:

lxc-clone currently updates the host-name option of /etc/dhcp/dhclient.conf when copying a container.
This isn't needed as Ubuntu uses "<hostname>" or "gethostname()" as dynamic placeholders specifically to avoid updating that file.

In quantal, I replaced our "<hostname>" patch by the isc upstream
"gethostname()" call in dhclient.conf, the upgrade worked fine for any
regular system but would cause a conffile upgrade prompt on containers
that were copied using lxc-clone.

I updated lxc-clone to only update host-name on systems that don't have
"<hostname>" or "gethostname()" so we don't regress the behaviour for
other distros but fix Debian and Ubuntu.

[rational]
There's no reason to currently updated /etc/dhcp/dhclient.conf on Ubuntu and Debian systems, this causes extra conffile prompts on upgrades and goes against our policy of using a clean Ubuntu system for our containers.

[test case]
1) lxc-create -t ubuntu -n p1
2) lxc-clone -o p1 -n p2
3) grep host-name /var/lib/lxc/p2/rootfs/etc/dhcp/dhclient.conf

3) shouldn't contain the container's hostname but "<hostname>" or
"gethostname()" (depending on Ubuntu versions of isc-dhcp)

[regression potential]
I believe the grep call is correct but should it fail, the worst that can happen is some system not getting their /etc/dhcp/dhclient.conf mangled (on non-ubuntu/non-debian containers) or having ubuntu/debian containers getting their /etc/dhcp/dhclient.conf mangled in an identical way as we do pre-sru.

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: lxc (Ubuntu Precise)
     Importance: Medium
     Assignee: Stéphane Graber (stgraber)
         Status: In Progress

** Affects: lxc (Ubuntu Quantal)
     Importance: Undecided
         Status: Fix Released

** Also affects: lxc (Ubuntu Precise)
   Importance: Undecided
       Status: New

** Also affects: lxc (Ubuntu Quantal)
   Importance: Undecided
       Status: New

** Changed in: lxc (Ubuntu Quantal)
       Status: New => Fix Released

** Changed in: lxc (Ubuntu Precise)
   Importance: Undecided => Medium

** Changed in: lxc (Ubuntu Precise)
     Assignee: (unassigned) => Stéphane Graber (stgraber)

** Changed in: lxc (Ubuntu Precise)
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1021416

Title:
  lxc-clone shouldn't be messing with dhclient.conf, causes conffile
  upgrade prompts on quantal

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



More information about the Ubuntu-server-bugs mailing list