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.
When on MAAS support doing charm based configuration of OVS by
retrieving MAC address of ports attached to external network
from MAAS.
Note that we should extend the MAAS support to also work with
deployments where MAAS does the OVS configuration for us.
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.
A recent change introduced a configuration option in the
./tests/test.yaml file (default location) which allows juju wait to be
used rather than waiting on various workload messages. This,
unfortunately, breaks mojo tests as they don't use a tests.yaml. This
change refactors that code, and enables a 'use_juju_wait' to be passed
into the relevant functions, and a new command line option (default
true) to disable using juju wait.
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.
When configuring the address to use to talk to Keystone,
the format_addr helper should be used to ensure that an
IPv4 or IPv6 address can be correctly handled.
For compatibility with existing scenario tests the
`configure_gateway_ext_port` helper currently make use of
`juju_wait` when configuring the deployed cloud.
This does not work well if the model you are testing has
applications with non-standard workload status messaging.
Allow to override the behaviour through config step options.
A couple of changes here:
* Ensure that the post-upgrade-hook runs BEFORE the config-changed to
set the openstack-origin/source back to distro. The former behaviour
breaks keystone quite badly.
* Ensure that the charm name is used, as discovered from the model, for
rabbitmq-server and percona-cluster to cope with different names for
the application in the model vs the charm name from the charm-store.
* Check whether the machine needs to be rebooted after the dist-upgrade
(before the do-release-upgrade), and reboot the machine first.
Otherwise, do-release-upgrade will fail.
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.
A recent change to allow multiple zazas to run at the same time fixed
the cacert file into a local 'tests/' directory. Unfortunately, that
doesn't exist for every environment where zaza runs (e.g. mojo) and so
this patch ensures that the path exists prior to trying to download into
it.
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