[Bug 753308] Re: Restart containers on upgrade

Serge Hallyn 753308 at bugs.launchpad.net
Mon Aug 1 18:47:49 UTC 2011


** Description changed:

+ =======================================================
+ 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_EXTRA_FLAGS=--libdir=$(LIBDIR) \
+  			  --with-rootfs-path=$(LIBDIR) \
+  			  --enable-doc
+ +DEB_DH_INSTALLINIT_ARGS=-r
+  
+  binary-install/lxc::
+  	cp debian/lxc.overrides debian/lxc/usr/share/lintian/overrides/lxc
+ 
+   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.type=veth
+ lxc.network.link=virbr0
+ lxc.network.flags=up
+ 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/lxc/l1/config /etc/lxc/l1.conf
+ 	/etc/init.d/lxc start
+      c. in another terminal, open a console:
+         lxc-console -n l1
+      d. re-install lxc
+         dpkg -i /var/cache/apt/archives/lxc_*.deb
+      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_INStALLINIT_ARGS and does not affect the
+      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_0.7.4-0ubuntu5_amd64.deb) ...
-  * Stopping LXC containers                                                                                                                            [ OK ] 
+  * Stopping LXC containers                                                                                                                            [ OK ]
  Unpacking replacement lxc ...
  Setting up lxc (0.7.4-0ubuntu5) ...
-  * Starting LXC containers                     
+  * Starting LXC containers
  
  I checked, it really stopped the containers.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 11.04
  Package: lxc 0.7.4-0ubuntu5
  ProcVersionSignature: Ubuntu 2.6.38-8.41-server 2.6.38.2
  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
+  PATH=(custom, no user)
+  LANG=en_US.UTF-8
+  SHELL=/bin/zsh
  SourcePackage: lxc
  UpgradeStatus: No upgrade log present (probably fresh install)

-- 
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/753308

Title:
  Restart containers on upgrade

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



More information about the Ubuntu-server-bugs mailing list