Fixes a typo (None -> not None) and renames the class from
ObjectRetrier -> ObjectRetrierWraps to make it clearer that the class
instantiation is to wrap and object with the retrier code rather than do
retries at that moment.
The main failure that seems to occur with clients is the
ConnectFailure, which according to the docs, is retry-able. Thus
provide a function that adds that exception condition automatically.
Also fix the import problem in octavia test for the object retrier that
is being used to validate the ObjectRetrier feature.
This adds a wrapper class that detects if a callable object in any of
the descendent objects raises an Exception. If so, then it retries that
exception.
This is to attempt to make the zaza tests a little more robust in the
face of small network failures or strange restarts. This is a test, and
robust logging a reporting should be used to determine whether it is
covering up actual bugs rather than CI system issues.
Related Bug: (zot repo)#348
* Fix the kerberos set-up by loosening ubuntu check
The cs:ubuntu charm's workload-status-message has changed recently (as
the charm was re-written). This PR loosens the application states check
to ignore the workload-status-message and just wait for the charm to be
active workload-status. This is almost certainly enough, as it's a very
simple charm.
* Fix tox.ini to pass tests (maybe)
The test was failing for xenial-ha-mysql bundle
This fixes the issue for cluster vault
by picking the right vault cluster leader
to run the commands against.
Co-authored-by: Bartosz Woronicz <bartosz.woronicz@canonical.com>
In the MySQL test we destroy a unit and then attempt to remove it from
metadata. The metadata removal (remove_instance action) gets stuck when it is
started while the destroyed unit has not been entirely removed and is still
running MySQL.
Wait for all the units to have cluster incomplete workload status message
before attempting the remove_instance.
This will allow security checks to be logically separate from other
functional tests, and adhere to a similar design pattern that is
used in other charm tests (see nova [0]) for an example. It will also
highight which security checks are currently passing, and which are not.
[0] 35840a66d6/zaza/openstack/charm_tests/nova/tests.py (L485-L529)
Partial-Bug: #1883196
The current approach of storing the deployment CA certificate in
the 'test/' relative path does not allow for executing tests for
multiple targets from the same environment.
We have previously moved (7a90110) the local copy of the SSH
private key for similar reasons.
Remove the global constants as we cannot build them without making
function calls, and we'd rather avoid doing that at module import
time. Code using the location of the local CA certificate has
already been changed to use helper functions.