Support clean container reboot vs shutdown disambiguation

Bug #914676 reported by Serge Hallyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
High
Unassigned
lxc (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Lxc currently disambiguates reboot from shutdown in a container by looking at the container's utmp. This means the container can't mount over /run, which in turn leads to a slew of other hacks.

1. Push the kernel patch by Daniel Lezcano which allows lxc to tell what the container wanted to do based on WTERMSIG(status).

2. Exploit this in lxc in place of the utmp watching.

3. Remove all the hacks in lxcguest surrounding the utmp hack.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

This is required in order to reach our goal of having a unmodified precise image (without the lxcguest package) start in a container.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in lxc (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → High
Changed in lxc (Ubuntu):
importance: Undecided → High
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Serge,

Can you attach the patch by Daniel Lezcano, or post a link to the patch?

tags: added: precise
tags: added: kernel-da-key
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 914676] Re: Support clean container reboot vs shutdown disambiguation

Quoting Joseph Salisbury (<email address hidden>):
> Hi Serge,
>
> Can you attach the patch by Daniel Lezcano, or post a link to the patch?

patch 0/1 is here:

https://lkml.org/lkml/2012/1/5/57

(if that's not convenient let me know and I'll extract and post the
patch, or I can post a tree on kernel.u.c)

Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.2.0-8.14)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

You can update to the latest development kernel by simply running the following commands in a terminal window:

    sudo apt-get update
    sudo apt-get upgrade

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-8.14
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Serge,

Thanks for posting the link. Do you know if this patch will make it into the 3.2 mainline kernel?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I ask because we would rather have the patch come through a stable update from upstream vs cherry picking it.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 914676] Re: Support clean container reboot vs shutdown disambiguation

Quoting Joseph Salisbury (<email address hidden>):
> Hi Serge,
>
> Thanks for posting the link. Do you know if this patch will make it
> into the 3.2 mainline kernel?

I don't see it going into 3.2, no. I'm hoping 3.3, but I don't even
know when that merge window closes.

Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

bug 914716 in libvirt is also dependent on the kernel patch.

(not making it a duplicate of this bug because it will require a separate userspace patch to exploit)

Changed in linux (Ubuntu):
status: Triaged → New
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Are you requesting that this patch be cherry picked for Precise?

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 914676

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Joseph:

yes, cherry-picking that patch for precise would be ideal for us.

tags: added: kernel-key
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-3ubuntu12

---------------
lxc (0.7.5-3ubuntu12) precise; urgency=low

  * If the kernel supports container reboot disambuation, then don't drop
    CAP_SYS_BOOT, and (always) try to use it after the container exits.
    (LP: #914676)
  * 0027-fix-lxc-netstat.patch: fix lxc-netstat for new nested cgroup
    handling (LP: #921732)
  * 0028-recursively-rmdir-cgroups.patch: if the container has created
    any cgroups (i.e. by starting libvirt), make sure to delete those.
    (LP: #921808)
 -- Serge Hallyn <email address hidden> Wed, 25 Jan 2012 14:22:51 -0600

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.2.0-11.19

---------------
linux (3.2.0-11.19) precise; urgency=low

  [ Daniel Lezcano ]

  * SAUCE: Add reboot_pid_ns to handle the reboot syscall
    - LP: #914676

  [ Upstream Kernel Changes ]

  * ALSA: hda - Introduce snd_hda_get_pin_label()
  * ALSA: hda - Cache the jack-detection value
  * ALSA: hda - Create jack-detection kcontrols
  * ALSA: hda - Manage unsol tags in hda_jack.c
  * ALSA: Introduce common helper functions for jack-detection control
  * ALSA: HDA: Jack: Export required functions from hda_jack.c
  * ALSA: hda/jack - Fix NULL-dereference at probing
  * ALSA: hda/jack - Fix the assignment of input jack-type
  * ALSA: hda - Add missing initialization of kctl jack status
  * ALSA: hda - Add missing inclusion of linux/export.h
  * ALSA: hda - Give more unique names by snd_hda_get_pin_label()
  * ALSA: hda - Fix a typo
  * ALSA: hda - Don't add channel suffix for headphone pin labels
  * ALSA: hda - Integrate input-jack stuff into kctl-jack
  * ALSA: hda/realtek - Avoid conflict of unsol-events with static quirks
  * ALSA: hda/realtek - Remove use_jack_tbl field
 -- Leann Ogasawara <email address hidden> Wed, 25 Jan 2012 06:57:19 -0800

Changed in linux (Ubuntu):
status: Incomplete → 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.