Commit Graph

149 Commits

Author SHA1 Message Date
Frode Nordahl
7a192e56c9 dvr_enabled: Avoid KeyError when Neutron not present 2022-04-26 11:48:38 +02:00
Frode Nordahl
3f711ff6da openstack: Add update subnet DHCP helper 2022-04-21 14:08:55 +02:00
Aurelien Lourot
7338af093e Add NovaComputeNvidiaVgpuWithHardwareTest 2022-03-17 13:55:47 +01:00
Felipe Reyes
7d5d34b7c4 Retry find_cirros_image() on URLError (#695)
There are situations where the DNS infrastructure hasn't been stable and
many CI jobs have failed with the error:

  urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>

This change decorates the function find_cirros_image() to retry and give
the job more chances of recovering from the DNS failures.
2022-01-20 14:15:50 +00:00
Alex Kavanagh
0af4c93d52 Switch unit.public_address to unit.get_public_address()
Due to the bug [1] on OpenStack providers, unit.public_address doesn't
actually work reliably.  The fix [2] is only for the async function
unit.get_public_address().  Sadly, zaza relied on unit.public_address
and so it needs this patch for juju 2.9 support on OpenStack providers.

This patch relies on an associated patch in zaza [3]; thus this will
fails its tests until that passes.

[1]: https://github.com/juju/python-libjuju/issues/551
[2]: https://github.com/juju/python-libjuju/pull/600
[3]: https://github.com/openstack-charmers/zaza/pull/468
2022-01-14 15:21:32 +00:00
Alex Kavanagh
1fbd505e27 Enable get_keystone_ip() to work with multiple vips config
The keystone charm allows multiple VIP addresses to be configured via
the 'vip' config parameter.  Unfortunately, get_keystone_ip() didn't
support this.  This patch adds that support, plus the missing tests.

Closes: #689
2022-01-07 16:56:22 +00:00
hemanthnakkina
1a1dc0a79e Add glance tests for Cinder Storage backend (#680)
Add zaza tests for charm glance when cinder is configured
as storage backend.

Related-Bug: LP#1905042

Co-authored-by: Hemanth Nakkina <hemanth.nakkina@canonical.com>
2021-12-01 10:20:08 +00:00
Corey Bryant
1eaa2233c1 Authenticate with cinder v3 endpoint by default
The v3 endpoint has been supported by the charms since Pike,
and the V2 endpoint was removed in Xena, therefore it makes
to use the v3 endpoint by default at this point.
2021-11-22 09:56:16 -05:00
Aurelien Lourot
50353b4625 Support 'to-be-set' value for 'data-port'
See https://github.com/openstack-charmers/openstack-bundles/pull/228
2021-11-04 14:59:23 +01:00
coreycb
6c834770ed Add neutron setup for VLAN provider network (#639)
This adds a new setup function that will setup a VLAN provider network.
It can be called by tests.yaml after basic_overcloud_network:
- zaza.openstack.charm_tests.neutron.setup.basic_overcloud_network
- zaza.openstack.charm_tests.neutron.setup.vlan_provider_overcloud_network
2021-10-08 16:05:36 +02:00
Aurelien Lourot
c32a6d420b Fix various typos 2021-09-24 14:20:01 +02:00
Aurelien Lourot
f8a88a98a6 Set timeout on juju_wait() (#630)
* Set timeout on juju_wait()

* Remove leftover traces

Traces should be made with logging.debug(). These traces
are probably leftovers from the development phase.
2021-09-09 09:27:20 +01:00
coreycb
c759a23962 Do not update external network data port if already set (#625) 2021-08-24 15:48:55 +02:00
Frode Nordahl
6e8201f696 Only configure one interface on MAAS provider
The Zaza MAAS code selects interfaces that are attached to the
provided CIDR, set up as unconfigured and has link.

In the event a machine has multiple unconfigured interfaces
attached to the same physical network, adding them all to the
configuration might lead to undesired side effects such as network
loops.
2021-08-13 08:46:27 +02:00
Aurelien Lourot
797e505f84 Add connection timeout to CirrOS image download (#604)
Without this timeout it has been observed that Zaza
may hang forever on open(). It is better to fail
faster and save time and resources.
2021-07-20 09:37:51 +01:00
Hernan Garcia
e67b0ea1e1 added glance functional test for image-conversion config 2021-05-31 03:45:45 -05:00
Aurelien Lourot
03ddaf0079 Add more logging around downloading/caching test images 2021-05-10 13:57:26 +02:00
Corey Bryant
d70ff79b1e Change log to debug to create less noise 2021-04-20 13:05:18 -04:00
Corey Bryant
9a48757d5e Fix version fallback path when /etc/openstack-release doesn't exist 2021-04-20 12:32:07 -04:00
Corey Bryant
0b401de17f Get OpenStack codename from /etc/openstack-release
In newer versions of Ubuntu and the Cloud Archive (currently Hirsute,
Wallaby, and above), there is an openstack-release package that, if
installed, specifies the current OpenStack release in
/etc/openstack-release.

Also adds wallaby definitions to non-version definitions in
os_versions.py.

Fixes #560
2021-04-20 10:31:04 -04:00
Ionut Balutoiu
7e56813885 Add Manila NetApp tests
These Zaza tests are meant to be used with the new `manila-netapp` charm.
2021-03-15 15:11:38 +02:00
Ionut Balutoiu
2fefca5a40 Code cleanup
* Move general function out of the testing class. This will make them
  easy to be reused.
* Properly organize the tests, and add tons of docstrings and comments
  to have them as clear as possible.
* Add `failover_cinder_volume_host` to the Zaza `utilities/openstack.py`,
  since this is a general purpose function.
2021-03-03 13:56:36 +02:00
Frode Nordahl
2ab9cebbf6 Use per-model tmp-dir to store local copy of CA cert (#493)
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.
2021-02-04 08:48:17 +01:00
Liam Young
5be8fc3771 Fix docstring and bug 2021-01-25 11:41:39 +00:00
Liam Young
e047150f5b Add unit tests 2021-01-25 09:21:00 +00:00
Liam Young
401829f0a7 Code tidy and docstrings 2021-01-24 17:24:20 +00:00
Liam Young
d637646a9e Fix typo 2021-01-24 16:19:45 +00:00
Liam Young
a20733cd14 Refactor ca functions 2021-01-24 14:31:29 +00:00
Liam Young
a828774c48 Handle change of CA cert.
Closes issue #487
2021-01-23 16:17:54 +00:00
Frode Nordahl
ec63732974 Support configuring networknig charms on MAAS
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.
2021-01-13 18:47:08 +01:00
Frode Nordahl
ee0dd80cec Split configure_gateway_ext_port function
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.
2021-01-13 18:47:05 +01:00
Chris MacNaughton
ebc51b490e Make the get_os_release default match get_current_os_release_pair 2021-01-06 17:19:56 +01:00
Alex Kavanagh
282b8be577 Update openstack upgrade tests for focal (#476)
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.
2021-01-06 14:09:41 +01:00
Liam Young
a35ba0917e Allow an app to be set when calling get_os_release (#477)
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).
2021-01-06 12:26:01 +01:00
Frode Nordahl
38767da01d Merge pull request #464 from openstack-charmers/lourot/ovn-codename-major-minor
Support 'major.minor' when determining OS release of OVN packages
2020-11-19 12:46:51 +01:00
David Ames
910516c3bd Merge pull request #465 from ajkavanagh/bug/460
Add placement-common versions for train->ussuri upgrade
2020-11-18 14:13:15 -08:00
Alex Kavanagh
f94f2be31d Merge pull request #462 from gnuoy/nova-client-version
Support nova client micro versions
2020-11-18 16:00:05 +00:00
Alex Kavanagh
b07afac21a Add placement-common versions for train->ussuri upgrade 2020-11-18 14:33:37 +00:00
Liam Young
817473675d Numbers are imutable so safe to have as default argument 2020-11-18 14:12:13 +00:00
Aurelien Lourot
c5c11194a1 Support 'major.minor' when determining OS release of OVN packages 2020-11-18 14:49:12 +01:00
Liam Young
dfecc58f5a Extend resource_reaches_status
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.
2020-11-18 12:13:59 +00:00
Liam Young
b23d9e285b Support nova client micro versions
Support micro versions when requesting a nova client.
2020-11-18 09:36:44 +00:00
Aurelien Lourot
d1dbefa6ec Merge branch 'master' into lourot/bug/1877076 2020-11-05 11:31:52 +01:00
Alex Kavanagh
79e43c7f68 bionic-train -> ussuri needs to upgrade placement
For the openstack upgrade of train to ussuri, the placement charm needs
to be upgraded.  Add it to the UPGRADE_SERVICES.  Related launchpad bug:
LP:1724174 [1]

[1]: https://bugs.launchpad.net/openstack-mojo-specs/+bug/1724174
2020-10-22 15:28:16 +01:00
Gabriel Adrian Samfira
7c2f5cdf24 Add Ironic tests 2020-10-06 06:06:57 +00:00
Aurelien Lourot
49268243ba Improve logging 2020-09-25 14:17:38 +02:00
James Page
018f1eac96 Merge pull request #398 from openstack-charmers/ceph-bluestore-compression
Ceph bluestore compression
2020-09-24 11:30:50 +01:00
Frode Nordahl
ced5b3dd13 Retry scp/ssh operations in add_interface_to_netplan helper
Fixes #420
2020-09-21 08:18:08 +02:00
Frode Nordahl
a1f3a8710f Teach Zaza to determine release pair for Ceph deployments
As Ceph is distributed as part of Ubuntu Cloud Archive, the
pockets lend their name from the accompanying OpenStack release.
2020-09-18 09:08:33 +02:00
Alex Kavanagh
17bad029a5 Fix network setup for mojo
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.
2020-09-15 09:55:09 +01:00