Use juju-exec in chron jobs for juju3 support

Change-Id: Id2a92a134c2e663b3dca10dbc36dd7c7afc9c86b
This commit is contained in:
Bas de Bruijne 2022-12-06 14:40:50 -04:00
parent 55bd702224
commit 6e5189646f
2 changed files with 3 additions and 2 deletions

View File

@ -2,8 +2,8 @@
# works out when to do the rotate and sync of the keys.
{% if enabled -%}
{% if use_syslog -%}
{{ minute }} * * * * root /usr/bin/juju-run {{ unit_name }} {{ charm_dir }}/scripts/fernet_rotate_and_sync.py 2>&1 | logger -t keystone-fernet-rotate-sync
{{ minute }} * * * * root $(which /usr/bin/juju-exec || which /usr/bin/juju-run) {{ unit_name }} {{ charm_dir }}/scripts/fernet_rotate_and_sync.py 2>&1 | logger -t keystone-fernet-rotate-sync
{% else -%}
{{ minute }} * * * * root /usr/bin/juju-run {{ unit_name }} {{ charm_dir }}/scripts/fernet_rotate_and_sync.py >> /var/log/keystone/keystone-fernet-rotate-sync.log 2>&1
{{ minute }} * * * * root $(which /usr/bin/juju-exec || which /usr/bin/juju-run) {{ unit_name }} {{ charm_dir }}/scripts/fernet_rotate_and_sync.py >> /var/log/keystone/keystone-fernet-rotate-sync.log 2>&1
{% endif -%}
{% endif -%}

View File

@ -26,6 +26,7 @@ requires =
pip < 20.3
virtualenv < 20.0
setuptools < 50.0.0
tox < 4.0.0
# NOTE: https://wiki.canonical.com/engineering/OpenStack/InstallLatestToxOnOsci
minversion = 3.18.0