At present Zaza will wait until it hits a timeout if one of the
units enters a error state while it awaits a idle model.
Add check for errored units to ``block_until_all_units_idle()``
and ``wait_for_application_states()``
Fixes#100
When running the file ready function each unit would download into the
same tmp directory. For files with restrictive permissions this would
lead to a permission denied and false negative on the second unit. i.e.
file is 444 and the subsequent scp fails due to the inability to
overwrite the first file.
Use a separate tmp dir for each unit to avoid this problem.
Make the series_upgrade_mongodb less specific to mongodb. We may
eventually use this to series upgrade vault.
Fix bug in the generalized series_upgrade_non_leaders_first.
Fix change in switch --agree to --yes.
unit.workload_status was actually reporting the application workload
status. Using the full status output from model.get_status() gives us
unit by unit workload status.
Updated block_until_unit_wl_status to use the full status output to
correctly block per unit.
When changing config we have a race that make the idle/ready
check run *before* the `config-changed` hook has started executing
on units. Subsequently tests are sometimes executed before or while
configuration change is in progress, leading to intermittent false
negative test failures.
Fixes#113
Some charms never implemented the workload status messages, these
charms have a wl status of unknown and wls message of ''. This fix
allows a wls of '' to be specified.
Currently interacting with functions in zaza.model requires the
model to be passed in. This has resulted in multiple calls to
get_juju_model(). It is cleaner to push these calls down into
the model wrapper and make the model_name an optional
argument. In addition, the current model name is now cached
without having to check the os.env each time.
Unfortunately this has resulted in the signature changing on a
great many function so this diff is bigger than would normally
be desirable.
Recently functions were added to zaza.model for adding and removing
models. These duplicated existing functions in zaza.controller.
Given these functions act against the controller, zaza.controller
feels like the correct location. In addition the implementations in
zaza.controller correctly handle disconnects which the new ones
did not.
This PR removes the duplicates and points any existing references
from zaza.model to zaza.controller. Finally, docstrings were added
and documentation links.