← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/turnip:fix-logrotate-conf-turnip-api-two-service-reloads into turnip:master

 

Guruprasad has proposed merging ~lgp171188/turnip:fix-logrotate-conf-turnip-api-two-service-reloads into turnip:master.

Commit message:
Use a single logrotate config block for turnip api log files

This fixes the issue of the turnip-api service getting reloaded twice, once for each log file specified.

LP: #2015860

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/turnip/+git/turnip/+merge/440736
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/turnip:fix-logrotate-conf-turnip-api-two-service-reloads into turnip:master.
diff --git a/charm/turnip-api/templates/logrotate.j2 b/charm/turnip-api/templates/logrotate.j2
index 17b96ea..2110ace 100644
--- a/charm/turnip-api/templates/logrotate.j2
+++ b/charm/turnip-api/templates/logrotate.j2
@@ -1,16 +1,4 @@
-{{ base_dir }}/logs/turnip-api-access.log {
-    rotate 90
-    daily
-    dateext
-    delaycompress
-    compress
-    missingok
-    create 0644 {{ user }} {{ group }}
-    postrotate
-        service turnip-api reload
-    endscript
-}
-
+{{ base_dir }}/logs/turnip-api-access.log
 {{ base_dir }}/logs/turnip-api-error.log {
     rotate 90
     daily
@@ -23,4 +11,3 @@
         service turnip-api reload
     endscript
 }
-

References