Commit Graph

2509 Commits

Author SHA1 Message Date
Billy Olsen
a64d2c6b03 Use zaza.model.run_on_unit for ca checks
Existing code uses the python libjuju unit.run in order to execute
a wait check for ca readiness across the units. The behavior of libjuju
changed between 2.x and 3.x and causes this functionality to break. This
is abstracted and handled in the zaza library, so use that code instead
as it properly handles the differences.

Signed-off-by: Billy Olsen <billy.olsen@canonical.com>
2024-03-18 12:27:04 -07:00
Alex Kavanagh
40a5919f71 Merge pull request #1186 from freyes/pin-netaddr
Pin netaddr<1.0.0
2024-02-21 19:16:12 +00:00
Felipe Reyes
3a89bda71b Pin netaddr<1.0.0
netaddr>=1.0.0 has incompatible changes, see
https://netaddr.readthedocs.io/en/latest/changes.html#release-1-0-0

The symptom detected at the gate is:

  TypeError: inet_pton() argument 2 must be str, not MagicMock

More details at
https://review.opendev.org/c/openstack/charm-nova-cloud-controller/+/909613
2024-02-21 15:47:33 -03:00
Alex Kavanagh
63487a8c2c Merge pull request #1185 from freyes/tmpdir
Set tempdir to a directory under ~/
2024-02-20 19:09:20 +00:00
Felipe Reyes
d28b885f7a Set tempdir to a directory under ~/
When juju 3.x is used (installed from a snap in strict confinement) the
temporary directory of the system (e.g. /tmp) can't be read by 'juju',
this is used by zaza-openstack-tests to write testing policy files
among other transitory files that are passed to juju's CLI.

This change moves Python's default temporary file to ~/tmp unless
overriden by the environment variable TEST_TMPDIR.
2024-02-19 11:03:16 -03:00
Alex Kavanagh
6f1a22c6c5 Merge pull request #1184 from freyes/testing-constraints
Add constraints file(s) for testing environments.
2024-02-16 15:06:00 +00:00
Felipe Reyes
1edba34f3e Add constraints file(s) for testing environments.
This change introduces a place to keep the constraints needed to build
testing environments. It will be global to all charms under the Charmed
OpenStack umbrella, they will be enforced by zosci at the gate.

These constraints are not meant to be used to build charms, for that the
tooling that should be used is pip-compile.
2024-02-16 11:50:23 -03:00
James Page
d70032b155 Merge pull request #1149 from rodrigogansobarbieri/add_ceph_keys_test
Add test to check ceph keys (new)
2024-01-09 16:10:33 +00:00
Alex Kavanagh
a276331624 Merge pull request #1177 from lmlg/ceph-standalone
Make Ceph tests self-contained.
2024-01-08 13:55:47 +00:00
Luciano Lo Giudice
4716fd5db9 Don't cache whether cinder is present 2024-01-05 20:40:36 -03:00
Luciano Lo Giudice
ad246b1a14 Improve exception handling, comments and naming 2024-01-03 16:50:02 -03:00
Luciano Lo Giudice
9a8b7650a0 PEP8 changes 2024-01-02 19:35:13 -03:00
Luciano Lo Giudice
f61ccd44f8 Make Ceph tests self-contained.
This PR implements the needed changes so that the Ceph charms
can be run without a full Openstack environment. In particular,
the RBD mirror charm needed tweaking so as to not depend on
Cinder, using pools of its own creating.
2024-01-02 19:26:28 -03:00
Alex Kavanagh
53248f2c79 Merge pull request #1172 from gnuoy/bug/2045206
Make wait_for_endpoints more robust.
2023-12-04 14:52:35 +00:00
Liam Young
7fe5b88a69 Move wait_for_url and rename wait_for_client 2023-12-04 13:18:08 +00:00
Liam Young
969c6a8a7b Make wait_for_endpoints more robust.
As seen in Bug #2045206 wait_for_endpoints can fails if keystone
is in a transient state. This change puts tenacity around the
keystone client setup to make it more resilient.

Closes-Bug: 2045206
2023-12-01 14:42:56 +00:00
Felipe Reyes
3f7dccc0e6 Merge pull request #1171 from coreycb/ssh-timeout
Increase tempest ssh timeout
2023-11-14 16:29:44 -03:00
Corey Bryant
35c8bdcc67 Increase tempest ssh timeout
Some of the tests that ssh into instances have been timing out
at times. Increase the timeout config for ssh.
2023-11-10 13:17:57 +00:00
Alex Kavanagh
04af9b3573 Merge pull request #1160 from coreycb/proposed-packages
Add test to report installed proposed packages
2023-11-08 09:23:01 +02:00
Felipe Reyes
3a221e5973 Merge pull request #1168 from openstack-charmers/skip-test-due-to-LP2042944
Disable changing default_ttl test due to designate bug
2023-11-07 11:35:42 -03:00
Felipe Reyes
d97f9030c4 Merge pull request #1167 from coreycb/tempest-octavia
Add tempest confirmation for octavia tests
2023-11-07 11:02:23 -03:00
Alex Kavanagh
a365823de0 Disable changing default_ttl test due to designate bug
In designate bobcat the designate team re-organised the sql-alchemy code
and this has resulted in the bug [1] that means that the default values
for various zone creations are no longer used from the
/etc/designate/designate.conf file.  i.e. the defaults are fixed.

Related-Bug: LP#2042944
2023-11-07 15:24:03 +02:00
Corey Bryant
0fdf38f49f Add tempest confirmation for octavia tests
This sets new tempest config options for octavia, including the setting
of log_user_roles=False, which allows tests to avoid the optional
list_role_assignments call that was resulting in 403 Forbidden for all
octavia tests.
2023-11-06 13:19:57 +00:00
Felipe Reyes
4bffe6c8e5 Merge pull request #1163 from coreycb/tempest-heat
Add new heat_plugin section to tempest.conf
2023-11-03 11:22:30 -03:00
Corey Bryant
c16c0f95c7 Clean up [heat_plugin] section 2023-11-03 14:08:52 +00:00
Liam Young
d2e88bb205 Merge pull request #1166 from hemanthnakkina/remove-lb-count
Remove assertion on number of loadbalancers
2023-11-03 10:04:59 +00:00
Hemanth Nakkina
82ba0944d5 Remove assertion on number of loadbalancers
Heat charm when configured with traefik-route
can have multiple loadbalancers (for heat-api
and heat-api-cfn).
So remove the assertion in wait_for_traefik on
number of loadbalancers. Check on number of units
against number of servers should be sufficient.
2023-11-03 15:24:12 +05:30
Liam Young
d6ada8976c Merge pull request #1164 from hemanthnakkina/ingress-workaround-fix
Fix traefik config filename
2023-11-03 08:03:04 +00:00
Hemanth Nakkina
6d9d712310 Fix traefik config filename
Traefik config file names are of format
juju_ingress_ingress_<id>_<app>.yaml for
ingress interface. However if traefik_route
interface is used, the file name format
is juju_ingress_traefik-route_<id>_<app>.yamlwq

In tempest tests, wait_for_traefik, change the
filename format to support both ingress and
traefik-route interfaces.
2023-11-03 13:21:06 +05:30
coreycb
18e735ce6d Merge pull request #1161 from openstack-charmers/add-nova-retrier
Add a retrier-wrap to the nova client for octavia tests
2023-11-02 07:41:50 -04:00
Corey Bryant
f1081a860b Add new heat_plugin section to tempest.conf
The heat tepest tests have moved out of tempest proper into a plugin.
This updates the tempest.conf accordingly.
2023-10-31 20:51:34 +00:00
Alex Kavanagh
def0148642 Add a retrier-wrap to the nova client for octavia tests
The nova service may not be quite ready after vault initialisation for
the basic network configuration, so add a retrier wrapper around the
client for every test to make sure that it retries.
2023-10-31 19:44:49 +00:00
Corey Bryant
3c545ad861 Fix pep8 failures 2023-10-30 13:42:46 +00:00
Corey Bryant
227ceb2bb8 Minor update to fix track on upgrade test
This should fix "Upgrading keystone to 2022.2/stable" resulting
in 'no releases found for channel "2022.2/stable"'.

Instead, keystone should be upgraded to zed/stable.
2023-10-30 13:25:05 +00:00
Corey Bryant
cec24d76a0 Add test to report installed proposed packages
For SRUs to Ubuntu and the Cloud Archive, bugs need to be updated
with testing results and package versions tested. This will enable
getting the package versions from charm units in an automated way.
2023-10-28 18:57:45 +00:00
Liam Young
014c4faf74 Merge pull request #1159 from gboutry/feat/openstack-exporter-k8s
Implement openstack exporter test
2023-10-26 17:06:12 +01:00
Alex Kavanagh
bb6264e519 Merge pull request #1158 from coreycb/upgrades
Updates for charm/openstack upgrade testing
2023-10-26 13:39:52 +01:00
Corey Bryant
1bb67ab122 Improve charm_upgrade imports and remove test pprints 2023-10-26 12:23:33 +00:00
Guillaume Boutry
ac50fa50c8 Implement openstack exporter test 2023-10-26 13:18:53 +02:00
Corey Bryant
0684a62383 Updates for charm/openstack upgrade testing
Updates charm upgrades to use channels, tracks, and risks instead
of URLs.

Currently these tests only upgrade OpenStack charms and packages.
The OVN, ceph, and misc charms and payloads are not upgraded.

Remove instance creation since tempest can be used to verify the
cloud.
2023-10-25 19:28:23 +00:00
Guillaume Boutry
cab219cfaa Merge pull request #1135 from gnuoy/keystone-ldap-k8s
Add Keystone LDAP on K8s tests
2023-10-25 15:52:02 +02:00
Liam Young
d98638fa4b Catch ConnectFailure 2023-10-25 12:24:55 +00:00
Liam Young
8f9eff813b Fix lint 2023-10-25 12:09:50 +00:00
Liam Young
baa02a30fc Catch connection errors 2023-10-25 11:47:09 +00:00
Liam Young
dc3e9d399a Fix call to super()._find_keystone_v3_group 2023-10-24 13:55:50 +00:00
Liam Young
590a17dfc0 Fix http_NotFound import 2023-10-24 12:54:28 +00:00
Liam Young
4823465175 Retry on 404s for keystone ldap 2023-10-24 11:59:35 +00:00
Liam Young
e3bbd947c4 Add Keystone LDAP on K8s tests
Add Keystone LDAP on K8s tests, this includes a minor refator of
the existing machine keystone LDAP tests.
2023-10-24 08:40:01 +00:00
Felipe Reyes
c866e77863 Merge pull request #1157 from coreycb/tempest-serial
tempest: Add serial config
2023-10-19 15:50:23 -03:00
Corey Bryant
19d8fc3db4 tempest: Add serial config
The serial config can be set to True to add the --serial flag to the
tempest run. This appears to be useful with the current state of
serverstack and fixing tests that fail due to "Bad router request:
Router already has a port on subnet <subnet-uuid>."
2023-10-19 13:41:03 -04:00