2900 Commits

Author SHA1 Message Date
Zuul
d47aefd7e7 Merge "Make ResourceFixtures configurable" 2023-09-29 12:13:31 +00:00
Zuul
6d89125d3e Merge "Create ResourceFixture: common class to manage OSP resources" 2023-09-29 12:04:52 +00:00
Eduardo Olivares
c2f03aff50 Skip SharedFixture.cleanUp during check-resources steps
The SharedFixture.cleanUp method is called when setup_fixture fails. The
aim of this is to delete the resources that were not successfully
created and allow next tests to create them properly.
This is not valid with check-resources steps because resources are not
created again.
So, in this case, it makes more sense to skip deletion of resources and
run the rest of tests with the existing ones, even if they fail.

Change-Id: I11b4eb5178c9891a692836ef720ca0487f407e60
2023-09-27 12:04:35 +02:00
Eduardo Olivares
6845550e0f Make ResourceFixtures configurable
With this patch, ResourceFixtures can be declared with
tobiko.required_fixture using kwargs.
Those kwargs can be used to modify default values from attributes used
within the ResourceFixtures subclass constructors

Change-Id: Ib3dbff002cec51336ed56aaa2a86e8dc207d9807
2023-09-26 08:53:49 +02:00
Eduardo Olivares
798ccdad50 Create ResourceFixture: common class to manage OSP resources
The new ResourceFixture is the base class used to manage the creation of
OSP resources that are not based on Heat Stacks.
The child classes only need to provide some mandatory attributes and
implement methods to create, find and delete resources.

Change-Id: I684e9561289e02578ee967aa4b6de02ac757fb14
2023-09-25 16:25:29 +02:00
Fiorella Yanac
715d6c9361 Add conditional trunk port
When vm is created, the trunk port may not have been created first.
By adding this conditional, vm depends on the existing trunk port.

Change-Id: I069698b869633007f49110463658c858236c9f32
2023-09-22 14:51:35 +01:00
Zuul
cd0b58190c Merge "Skip wait_for_guest_os_ready during check-resources" 2023-09-20 10:13:28 +00:00
Eduardo Olivares
1c1fb2d8e3 Skip wait_for_guest_os_ready during check-resources
Some tests from some CI jobs fail during check-resources test steps
because the console output is empty and the wait_for_guest_os_ready
method fails due to that.

Change-Id: Id0150f10cdf008fd7501bbedeff3209b3aa90cd0
2023-09-20 08:55:01 +02:00
Eduardo Olivares
6ca96d033a Fix cleanup Loadbalancers task from tobiko-cleanup role
Deleting Loadbalancer should be done one by one. The command fails if
more than one LB is used

Change-Id: Icd316cd410f8f94ab99136817c1fe45b68aa77e9
2023-09-19 08:37:23 +00:00
Zuul
2fc1b3b171 Merge "Fix Octavia HA test_stop_haproxy" 2023-09-18 15:07:38 +00:00
Slawek Kaplonski
c24dd0c244 Move sphinx_rtd_theme to the readthedocs requirements
This package was removed from the OpenStack requirements with [1] so
keeping it in the doc/requirements.txt file is causing failure in the
requirements-check job.
As we want to use this theme to build our docs, lets keep it in the
readthedocs_requirements.txt file which isn't checked by the
requirements-check job at all.

This patch also changes docs and releasenotes configs in the way that it
will fallback to one of the default themes provided by sphinx.

Finally it makes some additional changes to the releasenotes conf.py
file to make build of the releasenotes working fine.

[1] https://review.opendev.org/c/openstack/requirements/+/893665

Change-Id: Iff03b8596a9e772940fd959efa7cbf80a68e9eab
2023-09-18 15:45:23 +02:00
Zuul
54c29d5bfa Merge "Wait for guest OS ready after starting a VM" 2023-09-16 10:24:36 +00:00
Eduardo Olivares
25e38d1114 Wait for guest OS ready after starting a VM
test_3_activate_server shuts off and on a VM. With this patch, the test
will wait until the guest OS is ready after starting it.

Change-Id: I0350aec46c937d18e1188d2103c2059237005f92
2023-09-15 11:41:37 +02:00
Slawek Kaplonski
dc7e3b87b9 Stop using "system_packages" in readthedocs builds
It was removed on Aug 29th. See [1] for details.

[1] https://blog.readthedocs.com/drop-support-system-packages/

Change-Id: I0a97d33236f198670351dab7da61dc8f82981ac5
2023-09-15 06:36:51 +00:00
Eduardo Olivares
417a8ab14b Lock VM creation until guest OS is ready and cloud-init done
Avoid concurrency issues by locking VM creation until it is
completed.
Add step that verifies that the VM instance boot is completed before
releasing the lock and before the tests try to ping, ssh, etc that VM.
Add another step that checks the VM FIP is pingable.
Add a third step that checks the VM has completed the cloud-init
procedure.

Some tests (SameHostNetworkTest and DifferentHostNetworkTest) try to
migrate VMs immediately after creating them in order to move them to the
expected compute node. Sometimes, those VMs fail to contact the metadata
service because their migration happens exactly when the guest OS was
trying to obtain the metadata.
With this patch, those VMs are not migrated until the guest OS is ready.

Change-Id: Ia32b8c774e1c94277fa7243b7943a8b19763a501
2023-09-14 17:18:21 +02:00
Zuul
372cb72ce7 Merge "Delegate tasks from the tobiko-cleanup role to undercloud" 2023-09-13 15:04:47 +00:00
Zuul
787a4b73b3 Merge "Fix test_ipvX_subnet_nameservers when trunk ports are used" 2023-09-13 14:24:23 +00:00
Eduardo Olivares
9e99159c07 [IR plugin] Copy cert file to tester_node
When tobiko is run on a tripleo setup but it is not executed from the
undercloud node, some files such as the certificate file need to be
copied from the undercloud node to the tester node

Change-Id: Id78005d21e5e225666155fdbcb5e2385b5aa43ee
2023-09-13 12:43:04 +02:00
Eduardo Olivares
e926d82ea1 Fix test_ipvX_subnet_nameservers when trunk ports are used
When a VM is created with trunk ports, the DNS nameservers are added
to both the parent port and the subport.
This patch checks whether the VM has a VLAN interface (i.e. it uses
trunk ports) and, in that case, tests test_ipv4_subnet_nameservers and
test_ipv6_subnet_nameservers check nameservers from both parent port
and subport subnets.

Depends-On: I6fa5b70558e886b17c63dab61fad3c7a2728d148

Change-Id: I453be8aa13a5c27d425435160756d58b672d69d6
2023-09-12 18:09:41 +00:00
Eduardo Olivares
4089ef6afe Delegate tasks from the tobiko-cleanup role to undercloud
In case of tripleo setups, Tobiko can be executed from the undercloud or
from a different node (test_host).
In case it is not run from the undercloud, the tobiko-cleanup role has
to be delegated to the undercloud node.

Change-Id: Ic81196dee9735acbd1841baeb25003f96f69d5a2
2023-09-12 10:38:38 +02:00
Omer
171016d467 Fix Octavia HA test_stop_haproxy
So far, test_stop_haproxy failed randomly because amp_haproxy_unit was
not returned, randomly. When that happened, the test failed, as it tried
to stop the '' service/unit.

This patch wraps the amp_haproxy_unit retrieval in a tobiko.retry
mechanism.

Change-Id: Ifa987a32c22ac8050adb7ba2ac76b4e90bac9597
2023-08-30 15:48:17 +02:00
Eduardo Olivares
b32c3a5f6e Dropping python3.6 and python3.7 support
Depends-On: I4a5ac77948ddb65944b0852b03122190a659269b

Change-Id: If126f32a301c5bd0a2c50b6b9c6b0d8ef2cdf7ca
2023-08-25 15:39:07 +02:00
Eduardo Olivares
c6cf19e4c0 Update latest stable tag to 0.6.14 - latest supporting python3.6
A new tag is needed after 0.6.13 because the tag and the value
configured at infrared_plugin/roles/tobiko-ir-init/tasks/main.yaml
should be aligned in order to use it as the latest python3.6 supported
Tobiko version.

Change-Id: Ibd573d7b75e492259883ea1a6e455ee917a43f89
0.6.14
2023-08-25 10:37:13 +02:00
Eduardo Olivares
5409dbc33b Update latest stable tag to 0.6.13 - latest supporting python3.6
Tobiko is dropping python3.6 support after 0.6.13 (next release will be
0.7.0)

Change-Id: Ifb078ddd3a9d3d0000f84d546c425a8ddb20688c
2023-08-23 16:50:30 +02:00
Zuul
3b8cb8bb6b Merge "Use uptime instead to verify controllers reboot has been completed" 0.6.13 2023-08-22 14:34:06 +00:00
Eduardo Olivares
1cdce0c844 Use uptime instead to verify controllers reboot has been completed
Use uptime instead of hostname command to validate that a node has been
rebooted and the reboot is completed.

Related-patch: https://review.opendev.org/c/x/tobiko/+/888442
Change-Id: Ib8c625fb385d8dff514dd7f83de122ab872a14c6
2023-08-17 17:51:16 +02:00
Eduardo Olivares
27c9879c4b Raise ServerNotFoundError when deleting a nonexistent VM
When trying to delete a VM that does not exist, novaclient raises the
NotFound exception. Tobiko should capture that exception and raise
its own ServerNotFoundError, which is the one expected in Tobiko
code.

Change-Id: Iab6e6567698aa8a4b2311ddbcb1cd61d81ab8551
2023-08-16 12:34:29 +02:00
Zuul
803b230905 Merge "Stabilize test_z99_reboot_controller_galera_main_vip" 2023-08-11 10:23:24 +00:00
Eduardo Olivares
c01c28575b Update latest stable tag to 0.6.12
Change-Id: I89bb90f8ef0b2e83f291fd0f38823462920ecae2
2023-08-10 17:07:25 +02:00
Eduardo Olivares
6640a995e7 Stabilize test_z99_reboot_controller_galera_main_vip
This test tried to obtain the ports associated to a VM instance using:
ports = neutron.list_ports(device_id=vm['id'])

In order to make this test stable, the following filter should be used
instead:
ports = neutron.list_ports(device_id=vm['id'],
                           device_owner="compute:nova")

Change-Id: Iadcd7586b324ed1ce05b6130bb274182ab402014
2023-08-10 14:46:05 +02:00
Eduardo Olivares
483dcf22f0 Re-execute podman client setup commands in case user has changed
In some cases, the user that connects to the overcloud nodes running
podman containers may change during a CI job execution (e.g. in some
upgrade jobs). When Tobiko is executed before that change, it prepares
the podman.socket service to allow connections using the old user; then,
when Tobiko is executed with the new username, the podman.socket does
not allow connections.
With this patch, Tobiko checks whether the podman.socket service is
configured with the proper username and, if not, changes its
configuration and restarts it.

Change-Id: I8466c86c886c983734133a7b4d8435073e309a59
0.6.12
2023-08-07 17:32:38 +02:00
Eduardo Olivares
10e18bb48f Remove tobiko-infrared-fedora jobs
Removing fedora jobs voting because fedora36 is EOL and there is no
fedora>36 nodeset label available yet on upstream CI.

Change-Id: I74ce35027ba554176801781d974bf352b9344785
2023-08-04 10:55:13 +02:00
Zuul
b8c51e8350 Merge "Add network disruption method for ipv6 deployments." 2023-08-04 06:54:26 +00:00
Eduardo Olivares
d0607ad8cb Adding more logs to test_z99_reboot_controller_galera_main_vip
This test is not stable and, in order to determine the reason why it
fails sometimes, this patch prints some extra information:
- detailed info from the VMs generated during the test
- full list of neutron ports at the end of the test

Change-Id: I24349581cc5e657fa9f3b0e225936b1543c234a1
2023-08-02 11:16:34 +02:00
Julia Marciano
3c88b9e158 Add network disruption method for ipv6 deployments.
So far we used 'iptables' command to drop a connection to the dedicated overcloud node(s),which worked mostly for the ipv4 deployments.
This patch adds 'ip6tables' rules to allow this functionality for ipv6 deployments as well.

Change-Id: I15f20574502ed9ed50fc9abc0d6db051dfa65886
2023-08-01 18:54:21 +03:00
Eduardo Olivares
a86c116782 Improve reset_all_compute_nodes method
faults/ha tests use this method to reboot compute nodes, either
sequentially or in parallel.
In order to verify that the reboot was completed, this method executed
a 'hostname' command on the rebooted computes.
This didn't really guarantee that the reboot had been completed.
Replacing this 'hostname' command by the existing
RebootHostOperation.wait_for_operation method that obtains the output
from the 'uptime' command and compares it from the previous value: the
reboot is done when the uptime value has been updated.

Change-Id: I4f6a68eabec509b36e915fec7f4dfbd763c343d4
2023-07-13 10:44:10 +02:00
Eduardo Olivares
5d2a5574ea Resolve network stack creation concurrency issues
Tobiko tests are usually executed with several workers running in
parallel and they reuse shared resources such as networks.
Concurrency issues have been reproduced when several workers are
creating a common network stack.
This patch uses lockeutils to prevent several workers to try to create
the same network at the same time.

Change-Id: I26410654c9a9f4846bfcc1314386a035547f06a0
2023-07-10 21:12:56 +00:00
Zuul
e4ae45eb3c Merge "Revert "Regenerate HTML report files after any test case execution"" 2023-07-10 15:56:29 +00:00
Zuul
e3f28757d4 Merge "Adapt test_soft_reboot_computes_recovery to Amphora LBs" 2023-07-10 13:42:26 +00:00
Eduardo Olivares
3a610e1b2d Adapt test_soft_reboot_computes_recovery to Amphora LBs
When an Amphora LB exists this test should reboot the compute nodes
sequentially. Otherwise the Amphora LBs status is set to ERROR.

Change-Id: I897c608c87a20d912f44800d40f45e4dc81e4d55
2023-07-10 12:39:41 +02:00
Eduardo Olivares
5a0b7be457 Revert "Regenerate HTML report files after any test case execution"
This reverts commit 1953b9df40adf208cffdfc139f993c64a7f9261b.

Reason for revert: Due to this patch, Tobiko prints the same
Traceback several times when a test fails. More specifically, this
happens when other tests are executed after a test failure. Actually,
the Traceback is repeated as many times as tests are run after the
failure. Obviously, this makes the analysis of the test failures more
complicated.

Change-Id: I109e37dd3037d67d29cbc07b58d809f935d224d8
2023-07-10 12:14:56 +02:00
Eduardo Olivares
5a44f04fba Make check_no_duplicate_ips function more verbose
To help investigating when some tests fail, this patch prints within the
tobiko logs the list of ports before and after the controller reboot is
executed.

Change-Id: I7fa497558c0e42a386b0711344aee725ee3bd692
2023-07-07 14:00:47 +02:00
Eduardo Olivares
caaa22f5f3 Add octavia health checks to faults/ha tests
The disruptions executed during these tests may affect any existing
resources, previously created on the cloud. The current health checks
validate status of VMs, pacemaker, services, etc. This patch adds health
checks for any existing LBs.

Change-Id: I13563d639c40fb2d454a8aa1bf6f5c42ff72de78
2023-07-06 15:54:24 +02:00
Eduardo Olivares
6eded6a2c5 Make podman_version_3 method less verbose
This method checks the podman version running by checking the rpm
installed on the undercloud.
This is static information that will not change during the execution of
the tests, so the decorator @functools.lru_cache has been added to store
the result of this method and reuse it.

Change-Id: Id6d068b5e674474a73e76e6e75b3e101130e2c5b
2023-07-05 18:39:12 +02:00
Zuul
fffb33db8e Merge "Align check of nodes responsiveness for all the cases." 2023-07-05 15:34:14 +00:00
Zuul
656b9ffe3c Merge "Check containers are running after neutron services have been restarted" 2023-07-05 09:29:20 +00:00
Julia Marciano
13d3d1b517 Align check of nodes responsiveness for all the cases.
Change-Id: Ie8dbcca22b1732b93d4ccf5e323abcbb7fc906fd
2023-07-04 00:02:42 +03:00
Eduardo Olivares
87f8a8294e Check containers are running after neutron services have been restarted
Some neutron agent tests restart neutron services. With this patch, the
tests verify that the containers related to those services are running
after the service restarts.

Change-Id: Ic6d5c8d887bd8aa67b1f8b72d89430c3c0d9dc87
2023-07-03 07:47:58 +00:00
Eduardo Olivares
0c404a5928 workaround for filebeat: add newline at the end of xml reports
filebeat is unable to read xml files with results when they do not
finish with an empty line

Change-Id: I326192a784b652c2129d63d1b5fbf0bce8cd3a16
2023-07-03 08:18:58 +02:00
Zuul
c845501b73 Merge "Avoid concurrency issues when creating Cirros and Ubuntu images" 2023-06-26 20:52:59 +00:00