re-running tempest tests a second time identifies orphaned template

Bug #2055456 reported by Julia Kreger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Julia Kreger

Bug Description

Re-running the standalone tests:

tempest run --concurrency 2 --regex ironic_standalone

a second time on a pre-existing devstack node, we get a nice failure:

Captured pythonlogging:
~~~~~~~~~~~~~~~~~~~~~~~
    2024-02-29 18:50:05,199 204457 INFO [tempest.lib.common.rest_client] Request (SoftwareRaidDirect:test_software_raid): 409 POST https://173.231.255.102/baremetal/v1/deploy_templates 0.032s
2024-02-29 18:50:05,200 204457 DEBUG [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-OpenStack-Ironic-API-Version': '1.55', 'X-Auth-Token': '<omitted>'}
        Body: {"steps": [{"interface": "deploy", "step": "erase_devices_metadata", "priority": 98, "args": {}}, {"interface": "raid", "step": "apply_configuration", "priority": 97, "args": {"raid_config": {"logical_disks": [{"size_gb": "MAX", "raid_level": "1", "controller": "software"}]}}}], "name": "CUSTOM_RAID"}
    Response - Headers: {'date': 'Thu, 29 Feb 2024 18:50:05 GMT', 'server': 'Apache/2.4.52 (Ubuntu)', 'x-openstack-ironic-api-minimum-version': '1.1', 'x-openstack-ironic-api-maximum-version': '1.90', 'x-openstack-ironic-api-version': '1.55', 'openstack-request-id': 'req-12aee765-6749-4a3f-9c65-235c3c1d47c2', 'content-type': 'application/json', 'content-length': '147', 'connection': 'close', 'status': '409', 'content-location': 'https://173.231.255.102/baremetal/v1/deploy_templates'}
        Body: b'{"error_message": "{\\"faultcode\\": \\"Client\\", \\"faultstring\\": \\"A deploy template with name CUSTOM_RAID already exists.\\", \\"debuginfo\\": null}"}'

The tl;dr is the prior test run is not cleaning up after itself.

Changed in ironic:
assignee: nobody → Julia Kreger (juliaashleykreger)
importance: Undecided → High
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-tempest-plugin (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-tempest-plugin (master)

Reviewed: https://review.opendev.org/c/openstack/ironic-tempest-plugin/+/914981
Committed: https://opendev.org/openstack/ironic-tempest-plugin/commit/2053f02ee16054520ea7d804738a2c722555f624
Submitter: "Zuul (22348)"
Branch: master

commit 2053f02ee16054520ea7d804738a2c722555f624
Author: Julia Kreger <email address hidden>
Date: Wed Apr 3 07:46:30 2024 -0700

    Delete the CUSTOM_RAID template after test has finished

    Previously, the tempest plugin would orphan a CUSTOM_RAID
    deploy template in the ironic deployment by not removing it
    after the test has been completed. This change adds a cleanup
    to trigger the deletion of the template, so the test does not
    fail upon a second re-execution against the environment.

    Closes-Bug: 2055456
    Change-Id: I21ea329feb48e56b7f2984f62cdbc41c1a0bd1d0

Changed in ironic:
status: In Progress → Fix Released
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.