Merge lp:~hloeung/ubuntu-repository-cache/metadata-sync-cron-charm-env-fixes into lp:ubuntu-repository-cache

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: 276
Merged at revision: 276
Proposed branch: lp:~hloeung/ubuntu-repository-cache/metadata-sync-cron-charm-env-fixes
Merge into: lp:ubuntu-repository-cache
Diff against target: 8 lines (+1/-1)
1 file modified
templates/cron/ubuntu-repository-cache_rsync.cron (+1/-1)
To merge this branch: bzr merge lp:~hloeung/ubuntu-repository-cache/metadata-sync-cron-charm-env-fixes
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+387088@code.launchpad.net

Commit message

Fix metadata sync cron job

We rely on charm-env so the cron job can find dependent
libraries/modules. Unfortunately, with a unit with multiple charms
(subordinates), charm-env fails with 'Ambiguous possibilities for
JUJU_CHARM_DIR'. This fixes that by specifying we want the
'ubuntu-repository-cache' charm and the bundled libraries/modules.

To post a comment you must log in.
Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)
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
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change has no commit message, setting status to needs review.

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

Change successfully merged at revision 276

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/cron/ubuntu-repository-cache_rsync.cron'
2--- templates/cron/ubuntu-repository-cache_rsync.cron 2020-05-14 01:30:39 +0000
3+++ templates/cron/ubuntu-repository-cache_rsync.cron 2020-07-09 02:38:57 +0000
4@@ -1,4 +1,4 @@
5 # This cronjob will make the leader sync its view of the metadata with upstream
6 # It will then trigger a juju-run to let its peers synchronise.
7-{{ Minutes }} * * * * root . {{ ConfigPath }} && run-one /usr/local/sbin/charm-env python3 -m ubuntu_repository_cache.metadata_sync
8+{{ Minutes }} * * * * root . {{ ConfigPath }} && run-one /usr/local/sbin/charm-env --charm ubuntu-repository-cache python3 -m ubuntu_repository_cache.metadata_sync
9

Subscribers

People subscribed via source and target branches