Merge lp:~frankban/launchpad/setuplxc-fstab-tweak into lp:launchpad

Proposed by Francesco Banconi
Status: Merged
Merged at revision: 15114
Proposed branch: lp:~frankban/launchpad/setuplxc-fstab-tweak
Merge into: lp:launchpad
Diff against target: 17 lines (+7/-0)
1 file modified
utilities/setuplxc.py (+7/-0)
To merge this branch: bzr merge lp:~frankban/launchpad/setuplxc-fstab-tweak
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+102483@code.launchpad.net

Description of the change

= Summary =

We need to add a line to the container's fstab in order to work around
bug 974584, still affecting lucid lxc.

== Implementation details ==

setuplxc adds the line to fstab right after the container is created.

== Demo and Q/A ==

We should no longer see semaphore errors in our parallel test runs.

== lint ==

Checking for conflicts and issues in changed files.

Linting changed files:
  utilities/setuplxc.py

To post a comment you must log in.
Revision history for this message
Benji York (benji) wrote :

Looks good.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'utilities/setuplxc.py'
2--- utilities/setuplxc.py 2012-04-13 21:11:45 +0000
3+++ utilities/setuplxc.py 2012-04-18 10:19:22 +0000
4@@ -1029,6 +1029,13 @@
5 ])
6 if exit_code:
7 raise SetupLXCError('Unable to create the LXC container.')
8+ # XXX 2012-04-18 frankban bug=974584:
9+ # Add a line to the container's fstab to be able to create semaphores
10+ # in lxc. This workaround needs to be removed once the lxc bug is
11+ # resolved for lucid containers too.
12+ file_append(
13+ '/var/lib/lxc/{}/fstab'.format(lxcname),
14+ 'none dev/shm tmpfs defaults 0 0\n')
15 subprocess.call(['lxc-start', '-n', lxcname, '-d'])
16 # Set up root ssh key.
17 user_authorized_keys = os.path.expanduser(