From 67984a231bee180a0dab3cb7168b26ce5641bec3 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Thu, 12 Apr 2018 15:31:55 +0000 Subject: [PATCH] Fix juju wait to work against correct model juju_wait assumes it is working against the current model so explicitly set the JUJU_MODEL env variable before calling it to ensure it monitors the correct environment --- zaza/charm_lifecycle/deploy.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zaza/charm_lifecycle/deploy.py b/zaza/charm_lifecycle/deploy.py index b13bd62..e120646 100755 --- a/zaza/charm_lifecycle/deploy.py +++ b/zaza/charm_lifecycle/deploy.py @@ -5,6 +5,8 @@ import sys import juju_wait +import zaza.charm_lifecycle.utils as utils + def deploy_bundle(bundle, model): """Deploy the given bundle file in the specified model @@ -31,6 +33,7 @@ def deploy(bundle, model, wait=True): deploy_bundle(bundle, model) if wait: logging.info("Waiting for environment to settle") + utils.set_juju_model(model) juju_wait.wait()