Merge lp:~alexlist/charms/trusty/swift-storage/relax-directory-permissions-for-monitoring into lp:~openstack-charmers-archive/charms/trusty/swift-storage/next

Proposed by Alexander List
Status: Merged
Merged at revision: 37
Proposed branch: lp:~alexlist/charms/trusty/swift-storage/relax-directory-permissions-for-monitoring
Merge into: lp:~openstack-charmers-archive/charms/trusty/swift-storage/next
Diff against target: 27 lines (+4/-2)
1 file modified
hooks/swift_storage_utils.py (+4/-2)
To merge this branch: bzr merge lp:~alexlist/charms/trusty/swift-storage/relax-directory-permissions-for-monitoring
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
James Page Pending
Review via email: mp+224574@code.launchpad.net

This proposal supersedes a proposal from 2014-06-23.

To post a comment you must log in.
Revision history for this message
James Page (james-page) wrote : Posted in a previous version of this proposal

I'd prefer to limit this to /srv/node - the other two directories should probably not be world readable as they potentially contain files directly.

35. By Alexander List

[alexlist] update chmod to allow df and monitoring to access /srv/node

Revision history for this message
Stuart Bishop (stub) wrote :

Jame's comments have been addressed and the rest of the changes look fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/swift_storage_utils.py'
2--- hooks/swift_storage_utils.py 2014-06-19 08:40:58 +0000
3+++ hooks/swift_storage_utils.py 2014-06-27 10:05:13 +0000
4@@ -86,11 +86,13 @@
5 dirs = [
6 '/etc/swift',
7 '/var/cache/swift',
8- '/srv/node',
9 ]
10 [mkdir(d, owner='swift', group='swift') for d in dirs
11 if not os.path.isdir(d)]
12
13+ mountpoints = '/srv/node'
14+ if not os.path.isdir(mountpoints)
15+ mkdir(mountpoints, owner='swift', group='swift', perms=0755)
16
17 def register_configs():
18 release = get_os_codename_package('python-swift', fatal=False) or 'essex'
19@@ -189,7 +191,7 @@
20 mount(dev, '/srv/node/%s' % _dev, persist=True,
21 filesystem="xfs")
22 check_call(['chown', '-R', 'swift:swift', '/srv/node/'])
23- check_call(['chmod', '-R', '0750', '/srv/node/'])
24+ check_call(['chmod', '-R', '0755', '/srv/node/'])
25
26
27 def fetch_swift_rings(rings_url):

Subscribers

People subscribed via source and target branches