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
=== modified file 'utilities/setuplxc.py'
--- utilities/setuplxc.py 2012-03-12 21:25:46 +0000
+++ utilities/setuplxc.py 2012-03-13 10:06:19 +0000
@@ -819,6 +819,12 @@
819 sudoers.write(' /usr/local/bin/launchpad-lxc-test\n')819 sudoers.write(' /usr/local/bin/launchpad-lxc-test\n')
820 # The sudoers must have this mode or it will be ignored.820 # The sudoers must have this mode or it will be ignored.
821 os.chmod(sudoers_file, 0440)821 os.chmod(sudoers_file, 0440)
822 # XXX 2012-03-13 frankban bug=944386:
823 # Disable hardlink restriction. This workaround needs
824 # to be removed once the kernel bug is resolved.
825 procfile = '/proc/sys/kernel/yama/protected_nonaccess_hardlinks'
826 with open(procfile, 'w') as f:
827 f.write('0\n')
822828
823829
824def create_lxc(user, lxcname, ssh_key_path):830def create_lxc(user, lxcname, ssh_key_path):