Restart containers on upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Lucid |
Invalid
|
Undecided
|
Unassigned | ||
Maverick |
Fix Released
|
High
|
Unassigned | ||
Natty |
Fix Released
|
High
|
Unassigned |
Bug Description
=======
SRU Justification:
1. Impact: running containers are stopped and re-started when the lxc
package is updated.
2. How bug addressed: make dh_installinit with -r.
3. Minimal patch:
=== modified file 'debian/rules'
--- debian/rules 2011-01-23 17:28:55 +0000
+++ debian/rules 2011-08-01 18:33:23 +0000
@@ -10,6 +10,7 @@
DEB_CONFIGURE_
-
--enable-doc
+DEB_DH_
binary-
cp debian/
4. TEST CASE:
a. install lxc and debootstrap, and create a container:
apt-get -y install lxc debootstrap libvirt-bin
cat > /etc/lxc.conf << EOF
lxc.network.
lxc.network.
lxc.network.
EOF
lxc-create -t lucid -f /etc/lxc.conf -n l1
b. make the container autostart and start it
echo "RUN=yes" >> /etc/default/lxc
echo 'CONTAINERS="l1"' >> /etc/default/lxc
ln -s /var/lib/
/etc/init.d/lxc start
c. in another terminal, open a console:
lxc-console -n l1
d. re-install lxc
dpkg -i /var/cache/
Without this patch, the lxc-console will stop when the container is
stopped. With this patch, it will continue to run.
5. Regression potential:
This only adds a flag to DEB_DH_
lxc code itself. It should have no effect except when upgrading lxc.
=======
Binary package hint: lxc
I'm just seeing the upgrading to the latest lxc package:
Preparing to replace lxc 0.7.4-0ubuntu4 (using .../lxc_
* Stopping LXC containers [ OK ]
Unpacking replacement lxc ...
Setting up lxc (0.7.4-0ubuntu5) ...
* Starting LXC containers
I checked, it really stopped the containers.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: lxc 0.7.4-0ubuntu5
ProcVersionSign
Uname: Linux 2.6.38-8-server x86_64
Architecture: amd64
Date: Thu Apr 7 10:55:26 2011
InstallationMedia: Ubuntu-Server 10.04.2 LTS "Lucid Lynx" - Release amd64 (20110211.1)
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/zsh
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Clint Byrum (community): Approve
-
Diff: 42 lines (+12/-1)3 files modifieddebian/changelog (+9/-0)
debian/control (+2/-1)
debian/rules (+1/-0)
Changed in lxc (Ubuntu): | |
status: | Incomplete → In Progress |
Changed in lxc (Ubuntu): | |
status: | In Progress → Fix Released |
description: | updated |
Changed in lxc (Ubuntu): | |
assignee: | Serge Hallyn (serge-hallyn) → nobody |
Thanks for reporting this bug. Just to be sure I understand right, this is only happing for autostart containers, right?