Containers are stopped during lxc package upgrade

Bug #1476691 reported by Tyler Hicks
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Starting in Ubuntu 15.04, while using systemd as init, running containers are being stopped when an lxc package upgrade occurs. In older Ubuntu releases, running containers are still up after lxc package upgrades.

Serge reports that a simple `apt-get install --reinstall lxc` will reproduce this bug.

Here's another reproducer where I did a no change rebuild of lxc 1.1.2-0ubuntu3 as 1.1.2-0ubuntu4~nochange1:

tyhicks@sec-vivid-amd64:~$ sudo lxc-ls -f
NAME STATE IPV4 IPV6 GROUPS AUTOSTART
------------------------------------------------------
somename RUNNING 10.0.3.135 - - NO
tyhicks@sec-vivid-amd64:~$ sudo lxc-attach -n somename -- hostname
somename
tyhicks@sec-vivid-amd64:~$ sudo apt-get install lxc lxc-templates
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  liblxc1 python3-lxc
Suggested packages:
  btrfs-tools lvm2 lxctl qemu-user-static
The following packages will be upgraded:
  liblxc1 lxc lxc-templates python3-lxc
4 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/781 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  python3-lxc lxc-templates liblxc1 lxc
Install these packages without verification? [y/N] y
(Reading database ... 217273 files and directories currently installed.)
Preparing to unpack .../python3-lxc_1.1.2-0ubuntu4~nochange1_amd64.deb ...
Unpacking python3-lxc (1.1.2-0ubuntu4~nochange1) over (1.1.2-0ubuntu3) ...
Preparing to unpack .../lxc-templates_1.1.2-0ubuntu4~nochange1_amd64.deb ...
Unpacking lxc-templates (1.1.2-0ubuntu4~nochange1) over (1.1.2-0ubuntu3) ...
Preparing to unpack .../liblxc1_1.1.2-0ubuntu4~nochange1_amd64.deb ...
Unpacking liblxc1 (1.1.2-0ubuntu4~nochange1) over (1.1.2-0ubuntu3) ...
Preparing to unpack .../lxc_1.1.2-0ubuntu4~nochange1_amd64.deb ...
Unpacking lxc (1.1.2-0ubuntu4~nochange1) over (1.1.2-0ubuntu3) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up liblxc1 (1.1.2-0ubuntu4~nochange1) ...
Setting up python3-lxc (1.1.2-0ubuntu4~nochange1) ...
Setting up lxc (1.1.2-0ubuntu4~nochange1) ...
Setting up lxc dnsmasq configuration.
Setting up lxc-templates (1.1.2-0ubuntu4~nochange1) ...
Processing triggers for libc-bin (2.21-0ubuntu4) ...
tyhicks@sec-vivid-amd64:~$ sudo lxc-ls -f
NAME STATE IPV4 IPV6 GROUPS AUTOSTART
------------------------------------------------
somename STOPPED - - - NO
tyhicks@sec-vivid-amd64:~$ sudo lxc-attach -n somename -- hostname
lxc-attach: attach.c: lxc_attach: 632 failed to get the init pid

Tags: patch
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.1.2-0ubuntu5

---------------
lxc (1.1.2-0ubuntu5) wily; urgency=medium

  * debian/rules: call dh_systemd_start --no-restart-on-upgrade (LP: #1476691)

 -- Serge Hallyn <email address hidden> Thu, 23 Jul 2015 09:35:12 -0500

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.