Merge lp:~frankban/launchpad/setuplxc-944386 into lp:launchpad

Proposed by Francesco Banconi
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 14940
Proposed branch: lp:~frankban/launchpad/setuplxc-944386
Merge into: lp:launchpad
Diff against target: 16 lines (+6/-0)
1 file modified
utilities/setuplxc.py (+6/-0)
To merge this branch: bzr merge lp:~frankban/launchpad/setuplxc-944386
Reviewer Review Type Date Requested Status
Graham Binns (community) code Approve
Review via email: mp+97171@code.launchpad.net

Description of the change

== Changes ==

setuplxc: Added workaround to disable hardlink protection (see bug 944386).

To post a comment you must log in.
Revision history for this message
Graham Binns (gmb) :
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-03-12 21:25:46 +0000
3+++ utilities/setuplxc.py 2012-03-13 10:06:19 +0000
4@@ -819,6 +819,12 @@
5 sudoers.write(' /usr/local/bin/launchpad-lxc-test\n')
6 # The sudoers must have this mode or it will be ignored.
7 os.chmod(sudoers_file, 0440)
8+ # XXX 2012-03-13 frankban bug=944386:
9+ # Disable hardlink restriction. This workaround needs
10+ # to be removed once the kernel bug is resolved.
11+ procfile = '/proc/sys/kernel/yama/protected_nonaccess_hardlinks'
12+ with open(procfile, 'w') as f:
13+ f.write('0\n')
14
15
16 def create_lxc(user, lxcname, ssh_key_path):