launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29993
[Merge] ~cjwatson/launchpad:charm-librarian-fix-log-file into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:charm-librarian-fix-log-file into launchpad:master.
Commit message:
charm: Fix --logfile option passed to librarian
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/442770
The `launchpad-librarian@.service.j2` template is only rendered once, not once per worker, so we can't use the `logfile` variable here to get a per-worker log file path. Use systemd's instance name syntax to produce `--logfile {{ logs_dir }}/librarian1.log` when running `launchpad-librarian@1.service`, etc.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:charm-librarian-fix-log-file into launchpad:master.
diff --git a/charm/launchpad-librarian/templates/launchpad-librarian@.service.j2 b/charm/launchpad-librarian/templates/launchpad-librarian@.service.j2
index 846016e..8d380ca 100644
--- a/charm/launchpad-librarian/templates/launchpad-librarian@.service.j2
+++ b/charm/launchpad-librarian/templates/launchpad-librarian@.service.j2
@@ -14,7 +14,7 @@ WorkingDirectory={{ code_dir }}
MemoryMax=4G
Environment=LPCONFIG=launchpad-librarian%i
SyslogIdentifier=librarian
-ExecStart={{ code_dir }}/bin/twistd --python daemons/librarian.tac --pidfile {{ var_dir }}/librarian%i.pid --prefix librarian --logfile {{ logfile }} --nodaemon
+ExecStart={{ code_dir }}/bin/twistd --python daemons/librarian.tac --pidfile {{ var_dir }}/librarian%i.pid --prefix librarian --logfile {{ logs_dir }}/librarian%i.log --nodaemon
ExecReload=/bin/kill -USR1 $MAINPID
KillMode=mixed
Restart=on-failure