11 Commits

Author SHA1 Message Date
Eduardo Olivares
ae26041848 Fix Manila shares cleanup
Change-Id: I3c2640db28f1fc6bd40c22d3ed2ce9c1ae6d381b
2023-12-12 14:27:26 +00:00
Eduardo Olivares
ebdeee396e Fix cleanup octavia LBs
Change-Id: I805b0d434e2c2f204645eff8c9e38ce825b2e405
2023-11-23 16:40:02 +01:00
lkuchlan
5d04e37ab0 [Manila] pre-upgrade resource creation and post-procedure validation
There's a need to create a Manila share resource before the upgrade
process and then validate the share after the process is complete.
To achieve this objective, it is essential to incorporate support for
the Manila client, a task that is accomplished through this commit.

Change-Id: I0d520e40a1a491ee864e707d63413d10035b99ca
2023-10-09 12:45:10 +00: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
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
Eduardo Olivares
109802be5f Create only one Sec Group per fixture
This patch includes some changes wrt StatelessSecurityGroupFixture:
- a task that cleans up the security groups generated with this fixture
  is added to the tobiko-cleanup role
- when TOBIKO_PREVENT_CREATE env variable is set, the security groups
  are not created (they should have been created before)
- the lockutils.synchronized decorator is used to avoid that two
  security groups with the same name are created concurrently
- neutron.get_security_group(self.name) did not work because that method
  does not work with the security group name; it is replaced by
  neutron.list_security_groups(name=self.name) instead

Change-Id: I3ab84e138049a27db017630b32d81d290aa5f6cd
2023-04-21 13:17:31 +00:00
Eduardo Olivares
a6e7a522df Use Subnet pools to avoid cidr concurrency issues
This patch removes the tobiko.openstack.neutron._cidr module that was
used to generate CIDRs whenever tobiko was going to create a new subnet.
That method had problems when several tobiko workers running in parallel
tried to create subnets. Collisions happened sometimes, resulting in the
creation of two subnets with a common CIDR that could fail if they were
connected to a common router.

This patch uses the neutron subnet pool feature [1]. When Tobiko creates
a subnet, it will not calculate a free IPv4/IPv6 CIDR, but will
associate that subnet to common Subnet Pools, shared by the different
tests. When the subnet is created, it is neutron responsibiltiy to
allocate a free CIDR for that subnet, based on the created Subnet Pools.

The method that creates the Subnet Pools uses an
@oslo_concurrency.lockutils.synchronized decorator to guarantee that two
Tobiko workers do not create the same Subnet Pool at the same time.

[1] https://docs.openstack.org/neutron/latest/admin/config-subnet-pools.html

Change-Id: I3b09e468310e06f8c4b7d7dbec02e4b2e6f67530
2023-04-21 10:05:09 +02:00
Eduardo Olivares
afb3c5a99d Make stack cleanup task more robust
Deletion of heat stacks created by tobiko is not stable enough: the
command hangs forever and some stacks are not successfully deleted
In order to make this task more stable, a timeout is added to the
command and retries are added to the task

Change-Id: I7e1b851d7aa98007917675856cc20bc8fa4085a1
2022-03-21 14:05:21 +01:00
Omer
71da996a33 Add a workaround for octavia resources cleanup
So far, in case that Octavia loadbalancers (both amphora and ovn
providers) have had children (Octavia resources which were associated
to them), they couldn't have been deleted using the current tobiko
cleanup commands.

This patch adds to the cleanup commands the loadbalancer deletion
before the stacks are being deleted.

A seperate BZ (#2060338) was opened against openstack-heat for not
adding the --cascade option when deleting LBs with children.

Workarounds BZ #2060338 until it is fixed.

Change-Id: I58bfd7d1d63c6a028470b895d588d47fd9f0fcc2
2022-03-03 15:46:24 +00:00
Alex Katz
7bc7d1686a Make tobiko-cleanup role not to stuck at stack deletion
Change-Id: I721db29d0e03fec38436ff4820f5f461d3689443
2021-11-23 17:32:34 +02:00
Eduardo Olivares
454a63f4e6 Add new flag cleanup-heat-stacks to the infrared plugin
When this flag is set, the heat stacks created by tobiko are deleted at
the end of the tobiko infrared execution
Additionally, the images created by tobiko are also removed from glance

Change-Id: I3415a7fd73f02e47cf4a0c3351d90db3f7614fef
2021-10-20 06:43:33 +00:00