tempest cleanup is not cleaning up regions

Bug #1848672 reported by Martin Kopec
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Undecided
Martin Kopec

Bug Description

Steps to reproduce:
$ 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

$ openstack region create test1
$ openstack region create test2
$ openstack region list
+-----------+---------------+-------------+
| Region | Parent Region | Description |
+-----------+---------------+-------------+
| regionOne | None | |
+-----------+---------------+-------------+
| test1 | None | |
+-----------+---------------+-------------+
| test2 | None | |
+-----------+---------------+-------------+
$ tempest cleanup --dry-run
$ cat dry_run.json | grep region # returns nothing
$ cat dry_run.json | grep test # returns nothing
$ tempest cleanup
...
$ openstack region list
+-----------+---------------+-------------+
| Region | Parent Region | Description |
+-----------+---------------+-------------+
| regionOne | None | |
+-----------+---------------+-------------+
| test1 | None | |
+-----------+---------------+-------------+
| test2 | None | |
+-----------+---------------+-------------+

The bug was found after running smoke tests. Code base - current master.

We should add a functionality which discovers region (for init-saved-state) and then deletes leftover regions (in dry-run and cleanup).

Martin Kopec (mkopec)
Changed in tempest:
assignee: nobody → Martin Kopec (mkopec)
Changed in tempest:
assignee: Martin Kopec (mkopec) → Lukas Piwowarski (lukas-piwowarski)
Changed in tempest:
status: New → In Progress
Revision history for this message
Martin Kopec (mkopec) wrote :

A link for the proposed fix:
https://review.opendev.org/#/c/693818/

(don't know why this wasn't updated automatically when the review had got proposed)

Changed in tempest:
assignee: Lukas Piwowarski (lukas-piwowarski) → Martin Kopec (mkopec)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/693818
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3b1311f604d0beeadd17c031d314c080e3dc64c0
Submitter: Zuul
Branch: master

commit 3b1311f604d0beeadd17c031d314c080e3dc64c0
Author: Lukas Piwowarski <email address hidden>
Date: Tue Nov 12 10:43:40 2019 +0000

    Extend cleanup CLI to delete regions

    RegionService class enables deletion of regions which were
    neglected by tempest cleanup before.

    Change-Id: I2c978a7b2151b37bb0a224bafd1be490f04950ee
    Closes-Bug: #1848672

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tempest 23.0.0

This issue was fixed in the openstack/tempest 23.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.