container's udevadm trigger --add affects the host

Bug #925122 reported by Serge Hallyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Invalid
Medium
Unassigned
udev (Ubuntu)
Fix Released
Medium
Stéphane Graber

Bug Description

When the container does 'udevadm trigger --add' (in /etc/init/udevtrigger.conf), the host re-processes all those events too. This can lead (less importantly) to keyboard settings and soundcard levels being reset, but (more importantly) could presumably also cause worse troubles.

Once upstart has a concept of being ina container, udev should be updated to not run udevtrigger.conf when in a container.

Related branches

Changed in lxc (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Changed in udev (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

My guess is that juju is setting umask somewhere? The mode passed to mkdir(2) is &'d with the task's umask. The code in lxc definately passes 0755 as the mode. We could patch lxc to do an explicit chmod after the fact, but that seems like the wrong thing to do. The umask - ideally - was set as it was for a reason.

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

wrapping lxc-start confirms umask is 0077 when lxc-start is called through juju.

Changed in lxc (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

In my opinion, the fix here is for juju to set its umask to 0022 before calling lxc-start

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

(please feel free to re-mark confirmed for lxc if you disagree :)

Revision history for this message
Stéphane Graber (stgraber) wrote :

I applied the change to our packaging branch for udev but didn't upload yet as the new upstart failed to build on armel, armhf and powerpc.

Uploading the change with the current upstart would most likely break if not slow down the boot.

Changed in udev (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Stéphane Graber (stgraber)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package udev - 175-0ubuntu5

---------------
udev (175-0ubuntu5) precise; urgency=low

  [ David Henningsson ]
  * Remove jack-detection.patch: Now that PulseAudio uses the new jack
    detection interface, we can remove this patch.

  [ Stéphane Graber ]
  * debian/udev.udevtrigger.upstart: Update to wait for 'container' or
    'not-container' to be emitted, then skip just exit 0 but still run
    post-stop if it's a container and run 'udevadm trigger' if it's not.
    This is needed until we have a proper device namespace preventing
    udev events from affecting the outside.
    (LP: #925122)
  * Make udev depend on upstart >= 1.4-0ubuntu6 to ensure the next reboot
    will indeed either emit container or not-container.
 -- Stephane Graber <email address hidden> Fri, 17 Feb 2012 15:40:47 -0500

Changed in udev (Ubuntu):
status: Fix Committed → 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.