From 5060c07c36873f7ee5301efb2fd957479ecfeeaa Mon Sep 17 00:00:00 2001 From: Liam Young Date: Wed, 1 Jun 2022 10:38:28 +0100 Subject: [PATCH] Add method for restarting tvault-contego (#778) This is a temporary workaround to the bug while a packaging fix is investigated. --- zaza/openstack/charm_tests/trilio/setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zaza/openstack/charm_tests/trilio/setup.py b/zaza/openstack/charm_tests/trilio/setup.py index 11fe187..fbd87b7 100644 --- a/zaza/openstack/charm_tests/trilio/setup.py +++ b/zaza/openstack/charm_tests/trilio/setup.py @@ -176,3 +176,16 @@ def python2_workaround(): unit.entity_id, ("apt install --yes python-is-python3; " "systemctl restart wlm\\*.service")) + + +def restart_tvault_contego(): + """Workaround for Bug #1951999. + + tvault-contego may need restarting if nova.conf is rendered after + systemd has timed out restarting tvault-contego. + """ + for unit in zaza_model.get_units('trilio-data-mover'): + zaza_model.run_on_unit( + unit.entity_id, + ("systemctl restart tvault-contego; " + "./hooks/update-status"))