~hloeung/ubuntu-repository-cache/cache-memory-tuning-fix

« back to all changes in this revision

Viewing changes to templates/cron/ubuntu-repository-cache_rsync.cron

  • Committer: mergebot at canonical
  • Author(s): "Haw Loeung"
  • Date: 2020-07-09 02:46:01 UTC
  • mfrom: (275.1.1 ubuntu-repository-cache-charm)
  • Revision ID: mergebot@juju-139df4-prod-is-toolbox-0.canonical.com-20200709024601-rin4y8rkhfhmiv0r
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.

Reviewed-on: https://code.launchpad.net/~hloeung/ubuntu-repository-cache/metadata-sync-cron-charm-env-fixes/+merge/387088
Reviewed-by: Paul Collins <paul.collins@canonical.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# This cronjob will make the leader sync its view of the metadata with upstream
2
2
# It will then trigger a juju-run to let its peers synchronise.
3
 
{{ Minutes }} * * * * root . {{ ConfigPath }} && run-one /usr/local/sbin/charm-env python3 -m ubuntu_repository_cache.metadata_sync
 
3
{{ Minutes }} * * * * root . {{ ConfigPath }} && run-one /usr/local/sbin/charm-env --charm ubuntu-repository-cache python3 -m ubuntu_repository_cache.metadata_sync
4
4