Your message dated Mon, 26 Nov 2012 21:03:08 +0000
with message-id <[email protected]>
and subject line Bug#694337: fixed in lxc 0.8.0-2
has caused the Debian Bug report #694337,
regarding lxc: please make initscript work for containers with rootfs on block 
devices
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
694337: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694337
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lxc
Version: 0.8.0-1
Severity: wishlist
Tags: patch

Dear Maintainer,

Actually when calling, "/etc/init.d/lxc stop", lxc-halt will get called
for every containers which have auto-start enabled.

As mentioned in #683443, this doesn't work for containers which have
rootfs on a block device (the host system cannot chroot into a container
in this case).

On the other hand, the newly introduced lxc-shutdown requires the
administrator to modify each container's inittab (or whatever /sbin/init
variant is used).

I feel there's no "one size fits all"-solution. So my suggestion
(implemented in the attached patch) would be to delegate this choice to
the administrator, via an LXC_SHUTDOWN entry in /etc/default/lxc.

The patch also adds a debconf entry which will ask which shutdown system
should be used.

Thanks !

Cheers,
Marc

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (700, 'testing'), (500, 'testing-proposed-updates'), (500, 
'stable'), (300, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lxc depends on:
ii  debconf [debconf-2.0]  1.5.46
ii  libapparmor1           2.7.103-4
ii  libc6                  2.13-35
ii  libcap2                1:2.22-1.2
ii  multiarch-support      2.13-35

Versions of packages lxc recommends:
ii  cdebootstrap  0.5.9
ii  debootstrap   1.0.42
ii  libcap2-bin   1:2.22-1.2

lxc suggests no packages.

-- debconf information excluded
diff -ru lxc-0.8.0.orig/debian/lxc.config lxc-0.8.0/debian/lxc.config
--- lxc-0.8.0.orig/debian/lxc.config	2012-11-12 15:19:19.000000000 +0100
+++ lxc-0.8.0/debian/lxc.config	2012-11-25 11:05:14.540766013 +0100
@@ -13,6 +13,8 @@
 	db_set lxc/auto "${LXC_AUTO}"
 
 	db_set lxc/directory "${LXC_DIRECTORY}"
+
+	db_set lxc/shutdown "${LXC_SHUTDOWN}"
 fi
 
 db_settitle lxc/title
@@ -23,4 +25,8 @@
 db_input high lxc/directory "${LXC_DIRECTORY}" || true
 db_go
 
+db_settitle lxc/title
+db_input high lxc/shutdown "${LXC_SHUTDOWN}" || true
+db_go
+
 db_stop
diff -ru lxc-0.8.0.orig/debian/lxc.init lxc-0.8.0/debian/lxc.init
--- lxc-0.8.0.orig/debian/lxc.init	2012-11-12 15:19:19.000000000 +0100
+++ lxc-0.8.0/debian/lxc.init	2012-11-24 21:21:16.144670238 +0100
@@ -30,6 +30,7 @@
 fi
 
 LXC_AUTO="${LXC_AUTO:-true}"
+LXC_SHUTDOWN="${LXC_SHUTDOWN:-halt}"
 
 Lxc ()
 {
@@ -99,13 +100,13 @@
 	stop)
 		log_daemon_msg "Stopping Linux Containers"
 
-		Lxc halt
+		Lxc "${LXC_SHUTDOWN}"
 		;;
 
 	restart|force-reload)
 		log_daemon_msg "Restarting Linux Containers"
 
-		Lxc stop
+		Lxc "${LXC_SHUTDOWN}"
 		Lxc start
 		;;
 
diff -ru lxc-0.8.0.orig/debian/lxc.postinst lxc-0.8.0/debian/lxc.postinst
--- lxc-0.8.0.orig/debian/lxc.postinst	2012-11-12 15:19:19.000000000 +0100
+++ lxc-0.8.0/debian/lxc.postinst	2012-11-25 11:34:50.731098562 +0100
@@ -14,6 +14,9 @@
 		db_get lxc/directory
 		LXC_DIRECTORY="${RET:-/var/lib/lxc}" # string (w/o empty)
 
+		db_get lxc/shutdown
+		LXC_SHUTDOWN="${RET:-halt}" # string (w/o empty)
+
 		db_stop
 
 		if [ ! -e "${_CONFFILE}" ]
@@ -24,6 +27,7 @@
 
 LXC_AUTO="${LXC_AUTO}"
 LXC_DIRECTORY="${LXC_DIRECTORY}"
+LXC_SHUTDOWN="${LXC_SHUTDOWN}"
 EOF
 		fi
 
diff -ru lxc-0.8.0.orig/debian/lxc.templates lxc-0.8.0/debian/lxc.templates
--- lxc-0.8.0.orig/debian/lxc.templates	2012-11-12 15:19:19.000000000 +0100
+++ lxc-0.8.0/debian/lxc.templates	2012-11-25 11:18:17.765711440 +0100
@@ -20,3 +20,17 @@
  Containers.
  .
  If unsure, use /var/lib/lxc (default).
+
+Template: lxc/shutdown
+Type: string
+Default: halt
+_Description: LXC shutdown method
+ Different lxc subcommands can be used to shutdown Linux Containers. All of
+ them have drawbacks.
+ .
+ lxc-halt(1) won't work for containers which have a dedicated block device as
+ rootfs. lxc-shutdown(1) requires the container's inittab to be configured to
+ respond to SIGINT and SIGPWR signals. lxc-stop(1) kills all the processes
+ inside the container, without allowing them to terminate cleanly.
+ .
+ If unsure, use halt (default).

--- End Message ---
--- Begin Message ---
Source: lxc
Source-Version: 0.8.0-2

We believe that the bug you reported is fixed in the latest version of
lxc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <[email protected]> (supplier of updated 
lxc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 26 Nov 2012 21:43:10 +0100
Source: lxc
Binary: lxc lxc-dbg lxc-dev
Architecture: source i386
Version: 0.8.0-2
Distribution: unstable
Urgency: low
Maintainer: Daniel Baumann <[email protected]>
Changed-By: Daniel Baumann <[email protected]>
Description: 
 lxc        - Linux Containers userspace tools
 lxc-dbg    - Linux Containers userspace tools (debug)
 lxc-dev    - Linux Containers userspace tools (development)
Closes: 693381 693932 694337 694472
Changes: 
 lxc (0.8.0-2) unstable; urgency=low
 .
   * Adding patch to use debian essential stuff rather than openssl to
     generate random mac address in lxc-clone.
   * Adding rsync to suggests (Closes: #693932).
   * Adding Brazilian Portugese debconf translations from Adriano Rafael
     Gomes <[email protected]> (Closes: #693381).
   * Adding patch from Serge Hallyn <[email protected]> to not fail
     on failure to link kmsg (Closes: #694472).
   * Using lxc-shutdown in initscript rather than lxc-halt (Closes:
     #694337).
   * Using flock without -n in lxc-debconfig.
   * Updating todo file.
   * Replacing lxc-ubuntu with lxc-debconfig.
Checksums-Sha1: 
 883bd1104ac7f55a64888bb21724b33e22e3eab5 1258 lxc_0.8.0-2.dsc
 62f528fe562bdf6dfab228467cc9ffcc155ecf10 41048 lxc_0.8.0-2.debian.tar.xz
 2c66fbeb787a562c36ef066570408f5dca98cc37 173092 lxc_0.8.0-2_i386.deb
 c3120fd9f5eb9f15e6dc46327770e1830e1c720d 269274 lxc-dbg_0.8.0-2_i386.deb
 283bbd11da8fbecd2495753d371165df7ac52280 21070 lxc-dev_0.8.0-2_i386.deb
Checksums-Sha256: 
 696a5e8a2fd36ff6c9556d6b92d97c4e12a43a4c8ff4e7bf66ce0395260ae085 1258 
lxc_0.8.0-2.dsc
 0c1fbe03e6aa5c419abadddbf22bcf5d8a71189c9691eca9127b45ee67ff29da 41048 
lxc_0.8.0-2.debian.tar.xz
 49d954e1d4bc411cfb26e84525c68f637f0da2dcae7cdbd93a9be91dd3378a5c 173092 
lxc_0.8.0-2_i386.deb
 01949aaa818052e363b0c31221845fdb293f7460a9f04b82fd663bda33d55d62 269274 
lxc-dbg_0.8.0-2_i386.deb
 9af031f85e259fef87a057dfec0eca1ea46d5d3eca3cc0d6ef942eff83ba5350 21070 
lxc-dev_0.8.0-2_i386.deb
Files: 
 0296f3780b1d4049c3b805f2f95fd9d5 1258 admin optional lxc_0.8.0-2.dsc
 bc1834d0b012bee8e65ef984e735c749 41048 admin optional lxc_0.8.0-2.debian.tar.xz
 fde95820a781a7281cea94fa4b1efa03 173092 admin optional lxc_0.8.0-2_i386.deb
 1f9999a3489bd6191f6470776ea48013 269274 debug extra lxc-dbg_0.8.0-2_i386.deb
 a58f632f832fe109bab9aa81bc3502cd 21070 libdevel optional 
lxc-dev_0.8.0-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlCz1RsACgkQ+C5cwEsrK54D3QCfQ036wxgJsNI+lQbKl8jiEQZV
JxQAoLPxfbII5WG6r/gl/5sEqbeT85ai
=ZfYr
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to