Activity log for bug #1042431

Date Who What changed Old value New value Message
2012-08-27 21:31:50 Dan Kegel bug added bug
2012-08-28 14:38:56 Serge Hallyn lxc (Ubuntu): status New Triaged
2012-08-28 14:38:58 Serge Hallyn lxc (Ubuntu): importance Undecided Medium
2012-08-28 16:51:17 Dan Kegel attachment added 0001-Add-Centos-support-to-lxc-create.patch https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1042431/+attachment/3280828/+files/0001-Add-Centos-support-to-lxc-create.patch
2012-08-28 20:24:11 Ubuntu Foundations Team Bug Bot tags patch
2012-08-28 20:24:20 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Review Team
2012-08-30 15:10:50 Serge Hallyn lxc (Ubuntu): assignee Serge Hallyn (serge-hallyn)
2012-08-30 16:00:09 Launchpad Janitor lxc (Ubuntu): status Triaged Fix Released
2012-08-30 16:08:27 Serge Hallyn tags patch needsru patch
2012-08-30 16:09:03 Serge Hallyn nominated for series Ubuntu Precise
2012-08-30 16:09:03 Serge Hallyn bug task added lxc (Ubuntu Precise)
2012-08-30 16:16:00 Launchpad Janitor branch linked lp:ubuntu/lxc
2012-09-21 18:39:48 Serge Hallyn description As discussed in the thread "lxc template for RHEL?" http://sourceforge.net/mailarchive/message.php?msg_id=29730103 lxc-start-ephemeral only knows how to tweak the hostname for ubuntu and debian, and needs to be taught about where rhel and centos put hostname, something like this: --- lxc-start-ephemeral.orig 2012-08-27 12:19:03.935513119 -0700 +++ lxc-start-ephemeral 2012-08-27 12:19:54.471514479 -0700 @@ -154,7 +154,19 @@ LXC_MOUNTED=1 # Update the ephemeral lxc's configuration to reflect the new container name. - sudo sed -i -e "s/$LXC_BASE/$LXC_NAME/" $LXC_DIR/fstab $LXC_DIR/config $LXC_DIR/rootfs/etc/hostname $LXC_DIR/rootfs/etc/hosts + # Check all the places known distros keep hostnames. + # FIXME: should we sanity check the hostname to make sure it contains no bad chars? + for file in $LXC_DIR/fstab $LXC_DIR/config \ + $LXC_DIR/rootfs/etc/hostname \ + $LXC_DIR/rootfs/etc/hosts \ + $LXC_DIR/rootfs/etc/sysconfig/network \ + $LXC_DIR/rootfs/etc/sysconfig/network-scripts/ifcfg-eth0 + do + if test -f "$file" + then + sudo sed -i -e "s/$LXC_BASE/$LXC_NAME/" $file + fi + done # Update the fstab to have all bind mounts be ephemeral. sudo cp $LXC_DIR/fstab $LXC_DIR/fstab.old This affects 12.04 and the ppa for lxc, so probably also 12.10 alpha 3. =============================== SRU Justification: 1. Impact: lxc-start-ephemeral does not update hostname for fedora containers 2. Development fix: add the necessary files (/etc/sysconfig/) for fedora hosts to the list of files to be updated. 3. Stable fix: same as development fix. 4. test case: create a fedora container, then start an ephemeral one based on it: lxc-create -t fedora -n f14 lxc-start-ephemeral -o f14 and check its hostname 5. Regression potential: none - we only attempt updates if the file exists. =============================== As discussed in the thread "lxc template for RHEL?" http://sourceforge.net/mailarchive/message.php?msg_id=29730103 lxc-start-ephemeral only knows how to tweak the hostname for ubuntu and debian, and needs to be taught about where rhel and centos put hostname, something like this: --- lxc-start-ephemeral.orig 2012-08-27 12:19:03.935513119 -0700 +++ lxc-start-ephemeral 2012-08-27 12:19:54.471514479 -0700 @@ -154,7 +154,19 @@      LXC_MOUNTED=1      # Update the ephemeral lxc's configuration to reflect the new container name. - sudo sed -i -e "s/$LXC_BASE/$LXC_NAME/" $LXC_DIR/fstab $LXC_DIR/config $LXC_DIR/rootfs/etc/hostname $LXC_DIR/rootfs/etc/hosts + # Check all the places known distros keep hostnames. + # FIXME: should we sanity check the hostname to make sure it contains no bad chars? + for file in $LXC_DIR/fstab $LXC_DIR/config \ + $LXC_DIR/rootfs/etc/hostname \ + $LXC_DIR/rootfs/etc/hosts \ + $LXC_DIR/rootfs/etc/sysconfig/network \ + $LXC_DIR/rootfs/etc/sysconfig/network-scripts/ifcfg-eth0 + do + if test -f "$file" + then + sudo sed -i -e "s/$LXC_BASE/$LXC_NAME/" $file + fi + done      # Update the fstab to have all bind mounts be ephemeral.      sudo cp $LXC_DIR/fstab $LXC_DIR/fstab.old This affects 12.04 and the ppa for lxc, so probably also 12.10 alpha 3.
2012-09-21 18:39:53 Serge Hallyn bug added subscriber Ubuntu Stable Release Updates Team
2012-09-21 18:39:59 Serge Hallyn lxc (Ubuntu Precise): status New In Progress
2012-09-21 18:40:03 Serge Hallyn lxc (Ubuntu Precise): importance Undecided Medium
2012-10-25 13:46:39 Clint Byrum lxc (Ubuntu Precise): status In Progress Fix Committed
2012-10-25 13:46:42 Clint Byrum bug added subscriber SRU Verification
2012-10-25 13:46:49 Clint Byrum tags needsru patch needsru patch verification-needed
2012-10-28 16:02:06 Launchpad Janitor branch linked lp:ubuntu/precise-proposed/lxc
2012-11-07 17:07:33 Serge Hallyn tags needsru patch verification-needed needsru patch verification-done
2012-11-15 01:06:13 Clint Byrum removed subscriber Ubuntu Stable Release Updates Team
2012-11-15 01:06:28 Launchpad Janitor lxc (Ubuntu Precise): status Fix Committed Fix Released
2012-11-26 19:46:06 Launchpad Janitor branch linked lp:ubuntu/precise-updates/lxc