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.
The new PIP resolver wreaks havoc for this repository.
Long term we should split unit test requirements into a separate
file and whip unit tests into shape wrt. mocking out everything as
opposed to relying on having random modules installed in the test
environment.
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.
The test class BlueStoreCompressionCharmOperation gates tests on
whether the ceph release is mimic or newer but it uses the
keystone application to calculate the currently deployed version.
This PR switches the test class to ceck the version of ceph-mon
instead which makes more sense and the keystone application may
not always present in a ceph deployment.
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.
Before this fix, the test tried to determine the OpenStack
release based on the ceph-mon charm. Unfortunately Ceph has
the same version on Ussuri and Victoria. As a consequence
the test would wrongly conclude that it's testing against
"groovy_ussuri", which isn't a valid Ubuntu/OpenStack pair.
With this fix, the test now determines the OpenStack
release based on the keystone charm, with which we are able
to tell Ussuri and Victoria apart. This test class is being
run against the following charm functional tests at the
moment, which all have a keystone charm in their test
bundles: nova-compute, cinder-ceph, glance, ceph-fs,
ceph-radosgw and gnocchi.
Adds a test to check for groups that are coming from LDAP.
Adds a test to ensure that openstack is able to check the membership
of a user in the group.
Signed-off-by: Arif Ali <arif.ali@canonical.com>
- Reversed ldap-config-flags vs charm configs precedence
for https://review.opendev.org/748364
- Added new functional test to validate the precedence
- Added zaza helper function to assist handling charm configs
that do not accept "" (like booleans and ints), and reverting
to unset values through config_change()
- Fixed zaza reset helper function that apparently never
worked ({}.keys() returns dict_keys which is not a sequence)
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.