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
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.
The function does three separate things today, and two of its
tasks are useful for other provider types such as MAAS.
Also fix create_additional_port_for_machines idempotency.
We previously added a run time assertion to fail early when
attempting to configure networking for an invalid bundle. The
check had the side effect of prohibiting subsequent runs on
already configured models.
This patch modifies the existing openstack upgrade tests so that they
work with focal (by explicitly supporting mysql-innodb-cluster), and are
also interruptable and resumable (at a charm level). It also makes them
work with the udpated 'get_upgrade_groups()' that ultimately gets a List
of Tuples rather than a dictionary.
Ceph deployments may not contain a keystone service which causes
calls to get_os_release to fail as it calls get_current_os_release_pair
without sepecifying an application (keystone is the default).
* Updates to concurrent series upgrade
Updates to make it run more in parallel and spend less time waiting on
the whole model when updating machines.
* Make the concurrent series upgrade tests work
This is a number of changes to get the concurrent (here called
'parallel' historically) series upgrade tests to work. A number of
changes were required which included limiting the number of concurrent
async co-routines (futures) that could be run as with large models it
hits the limits of the Py3 runtime.
* Fix the tests and change pause order in maybe_pause_things
Due to an additional model helper call, an additional model AsyncMock is
required. Also the pause order had changed, and this is restored to
ensure the original design is retained (for pause order).
Clean up some commented out code and sort out a few PEP8 errors.
* Update comment to reflect code (3 -> 4)
* Fix tests that fail on bionic but pass on focal
Essentially, asyncio.gather has different behaviour on bionic that
focal. Although this doesn't affect testing, it does affect the unit
tests. These changes are simply to normalise the behaviour of unit
tests on focal and bionic.
The resource_reaches_status assumes that the attribute to be checked
is called 'status' but this can vary between resource types so allow
the name of the attribute to specified.
To support OVS to OVN migration checks we want the basic overcloud
configure job to set up N-OVS and/or N-GW when present and the
OVN pre migration configure job will copy the configuration for us.
The biggest change is that the upgrade_groups() is a list of tuples ...
[()] ... rathern than a collections.OrderedDict(). This tends to make
more sense as they are processed in order and don't actually need to be
indexed.
Also excludes easyrsa (as it's not an upgrade target) and adds a
"Database Services" which upgrades mysql or percona FIRST before moving
on to rabbitmq and other stateful services. This is because some charms
really need to talk to mysql if one of the other stateful services does
a relation changed hook. This makes it more likely that the system will
ugprade correctly.
Fix paramiko.ssh_exception.BadAuthenticationType when SSHing to a new Ubuntu instance.
Note that paramiko still has a few issues around authentication:
https://github.com/paramiko/paramiko/pull/1106/files
This paramiko PR also shows that password='' isn't the same as
password=None
This is the 3rd change in the effort to deprecate
zaza.openstack.utilities.juju in favour of zaza.utilities.juju.
All functions now just wrap their equivalents in
zaza.utilities.juju and a decorator has been added which logs a
warning if the function is used.
Because the OpenStack charms re-render their config
whenever things are incorrect, we can accept any new
package defaults as a part of the upgrade and
resolve incorrect config after the upgrade