Merge lp:~mthaddon/charms/trusty/postgresql/logs-owned-postgres into lp:charms/trusty/postgresql

Proposed by Tom Haddon
Status: Merged
Merged at revision: 140
Proposed branch: lp:~mthaddon/charms/trusty/postgresql/logs-owned-postgres
Merge into: lp:charms/trusty/postgresql
Diff against target: 19 lines (+4/-2)
1 file modified
hooks/service.py (+4/-2)
To merge this branch: bzr merge lp:~mthaddon/charms/trusty/postgresql/logs-owned-postgres
Reviewer Review Type Date Requested Status
Stuart Bishop (community) Approve
Review via email: mp+282570@code.launchpad.net

Description of the change

Make sure log dir and log file are owned by postgres

To post a comment you must log in.
Revision history for this message
Stuart Bishop (stub) wrote :

lgtm +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/service.py'
2--- hooks/service.py 2015-12-24 06:34:31 +0000
3+++ hooks/service.py 2016-01-14 11:25:54 +0000
4@@ -915,11 +915,13 @@
5 owner='root', group='postgres', perms=0o755)
6
7 if not os.path.exists(logs_dir):
8- helpers.makedirs(logs_dir, mode=0o755)
9+ helpers.makedirs(logs_dir, mode=0o755, owner='postgres',
10+ group='postgres')
11 # Create the backups.log file used by the backup wrapper if it
12 # does not exist, in order to trigger spurious alerts when a
13 # unit is installed, per Bug #1329816.
14- helpers.write(helpers.backups_log_path(), '', mode=0o644)
15+ helpers.write(helpers.backups_log_path(), '', mode=0o644,
16+ owner='postgres', group='postgres')
17
18
19 @data_ready_action

Subscribers

People subscribed via source and target branches

to all changes: