← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~lgp171188/launchpad:launchpad-scripts-fix-sync-librarian-logs into launchpad:master

 

Guruprasad has proposed merging ~lgp171188/launchpad:launchpad-scripts-fix-sync-librarian-logs into launchpad:master.

Commit message:
charm/launchpad-scripts: Pre-create the directories for sync-librarian-logs

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~lgp171188/launchpad/+git/launchpad/+merge/449338
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/launchpad:launchpad-scripts-fix-sync-librarian-logs into launchpad:master.
diff --git a/charm/launchpad-scripts/templates/sync-librarian-logs.j2 b/charm/launchpad-scripts/templates/sync-librarian-logs.j2
index 5d8ae9b..22b5f64 100644
--- a/charm/launchpad-scripts/templates/sync-librarian-logs.j2
+++ b/charm/launchpad-scripts/templates/sync-librarian-logs.j2
@@ -2,9 +2,11 @@
 
 {% if librarian_frontend_ip_addresses %}
 {% for ip_address in librarian_frontend_ip_addresses %}
+mkdir -p {{ librarian_logs_dir }}/frontend-{{ loop.index0 }}
 rsync -aq --timeout=120 --delete {{ ip_address }}::librarian-logs/ {{ librarian_logs_dir }}/frontend-{{ loop.index0 }}/
 {% endfor %}
 
+mkdir -p {{ librarian_logs_dir }}/for_parsing
 rm -f {{ librarian_logs_dir }}/for_parsing/*
 
 {% for ip_address in librarian_frontend_ip_addresses %}