Bug 1763050 - tempest cleanup command is not cleaning up regions
Summary: tempest cleanup command is not cleaning up regions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tempest
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z11
: 13.0 (Queens)
Assignee: Lukas Piwowarski
QA Contact: Martin Kopec
URL:
Whiteboard:
Depends On:
Blocks: 1787368
TreeView+ depends on / blocked
 
Reported: 2019-10-18 07:09 UTC by Michele Valsecchi
Modified: 2023-10-06 18:41 UTC (History)
8 users (show)

Fixed In Version: openstack-tempest-18.0.0-12.el7ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 1787368 (view as bug list)
Environment:
Last Closed: 2020-03-10 11:52:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verification output (41.30 KB, text/plain)
2020-02-11 08:30 UTC, Martin Kopec
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1848672 0 None None None 2019-10-18 08:40:51 UTC
OpenStack gerrit 693818 0 'None' MERGED Extend cleanup CLI to delete regions 2020-07-20 20:22:39 UTC
Red Hat Issue Tracker OSP-3810 0 None None None 2022-08-18 17:19:10 UTC
Red Hat Knowledge Base (Solution) 4500391 0 None None None 2020-07-20 20:24:48 UTC
Red Hat Product Errata RHBA-2020:0769 0 None None None 2020-03-10 11:53:13 UTC

Description Michele Valsecchi 2019-10-18 07:09:03 UTC
Description of problem:
`tempest cleanup` command is not cleaning up the region(s) tempest has creates during its execution.

Running  `tempest run --smoke` (even followed by `tempest cleanup`) a few times, will results in many unused regions being created and left behind.

Version-Release number of selected component (if applicable):
13.0.7
13.0.8
(Haven't tested version lower than 13.0.7)

How reproducible:

$ openstack region list
+-----------+---------------+-------------+
| Region    | Parent Region | Description |
+-----------+---------------+-------------+
| regionOne | None          |             |
+-----------+---------------+-------------+
$ tempest cleanup --init-saved-state
$ ll saved_state.json 
-rw-rw-r--. 1 stack stack 107598 Oct 18 02:32 saved_state.json <=== state is saved 
$ tempest run --smoke
$ tempest cleanup --dry-run
Begin cleanup
Process 0 projects
$ cat dry_run.json 
{
  "_projects_to_clean": {},
  "domains": [],
  "flavors": [],
  "images": [],
  "projects": [],
  "roles": [],
  "users": []
}
$ openstack region list
+---------------------------+---------------+-------------+
| Region                    | Parent Region | Description |
+---------------------------+---------------+-------------+
| regionOne                 | None          |             |
| tempest-region-1060190437 | None          |             | <=====
| tempest-region-259179736  | None          |             | <===== regions are left behind, after cleaning up (--dry-run): this is expected
| tempest-region-303446827  | None          |             | <=====
| tempest-region-945563805  | None          |             | <=====
+---------------------------+---------------+-------------+
$ tempest cleanup
Begin cleanup
Process 0 projects
$ openstack region list
+---------------------------+---------------+-------------+
| Region                    | Parent Region | Description |
+---------------------------+---------------+-------------+
| regionOne                 | None          |             |
| tempest-region-1060190437 | None          |             | <=====
| tempest-region-259179736  | None          |             | <=====  regions are left behind, after cleaning up: this is not expected
| tempest-region-303446827  | None          |             | <=====
| tempest-region-945563805  | None          |             | <=====
+---------------------------+---------------+-------------+

Actual results:

`tempest cleanup` should restore the environment to the same state where it was before running `tempest run`.

Expected results:
`tempest cleanup` leaves behind regions it created during its execution

Comment 10 Martin Kopec 2020-02-11 08:30:12 UTC
Created attachment 1662398 [details]
verification output

The 'Fixed in version' contains the fix for the issue, verified on a 13 env using 2020-02-06.2 puddle. Verification output attached.

Comment 13 errata-xmlrpc 2020-03-10 11:52:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0769


Note You need to log in before you can comment on or make changes to this bug.