Merge ~tcuthbert/container-log-archive-charm:master into container-log-archive-charm:master

Proposed by Thomas Cuthbert
Status: Merged
Approved by: Thomas Cuthbert
Approved revision: 6f9a6938c6d13304f10aa77a0a72513f639bcff9
Merged at revision: 8fb8a937d843328d452bcbd8767684a6e6f848a8
Proposed branch: ~tcuthbert/container-log-archive-charm:master
Merge into: container-log-archive-charm:master
Diff against target: 17 lines (+3/-3)
1 file modified
hooks/hooks.py (+3/-3)
Reviewer Review Type Date Requested Status
Laurent Sesquès Approve
Canonical IS Reviewers Pending
Review via email: mp+388287@code.launchpad.net

Commit message

os/grp function call arguments needed tweaking to actually work

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Laurent Sesquès (sajoupa) :
review: Approve
Revision history for this message
Benjamin Allot (ballot) wrote :

Some inline comments, not blocking

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 8fb8a937d843328d452bcbd8767684a6e6f848a8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/hooks.py b/hooks/hooks.py
2index fed7a0c..748423a 100755
3--- a/hooks/hooks.py
4+++ b/hooks/hooks.py
5@@ -271,9 +271,9 @@ def configure_logrotate():
6 # Initialise the log file with the correct permissions
7 with open(log_path, "w"):
8 pass
9- os.chmod(log_path, "0o664")
10- gid = grp.getgrgid("log-archive")
11- os.chown(log_path, "root", gid)
12+ os.chmod(log_path, 0o664)
13+ gid = grp.getgrnam("log-archive").gr_gid
14+ os.chown(log_path, 0, gid)
15 try:
16 shutil.copyfile(logrotate_file, logrotate_path)
17 except OSError as e:

Subscribers

People subscribed via source and target branches