TestNetworkBasicOps.test_network_basic_ops is racy

Bug #1845486 reported by Soren Hansen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Low
Eliad Cohen

Bug Description

tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops was failing for me pretty consistently. Adding a few strategically placed time.sleep(10) fixed it.

Digging through tempest's logs, I can see that it gets the list of ports for the VM and since the port is not active, it immediately gives up. The port is in state "BUILD". Waiting a number of seconds sorts it out.

Changed in tempest:
assignee: nobody → Soren Hansen (soren)
status: New → In Progress
Revision history for this message
Martin Kopec (mkopec) wrote :

What's the status here? Is it in progress? Also could you please share more info, some tracebacks and logs etc ..

Revision history for this message
Martin Kopec (mkopec) wrote :

Seems that the test should check if the port is in ACTIVE state and if it's not , it should wait for it. A port is created here [1] by this method [2] in which we could use call_until_true method like in this case of floating ip for example [3].

Moving to Confirmed state and dissociating assignee as no one seems to work on this atm.

[1] https://opendev.org/openstack/tempest/src/branch/master/tempest/scenario/test_network_basic_ops.py#L116-L119
[2] https://opendev.org/openstack/tempest/src/commit/5c191faae78f52f876edba72484ea644d3df04fd/tempest/scenario/manager.py#L140-L155
[3] https://opendev.org/openstack/tempest/src/commit/5c191faae78f52f876edba72484ea644d3df04fd/tempest/scenario/manager.py#L1040-L1047

Changed in tempest:
assignee: Soren Hansen (soren) → nobody
importance: Undecided → Low
status: In Progress → Confirmed
Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
Martin Kopec (mkopec) wrote :
Martin Kopec (mkopec)
Changed in tempest:
assignee: nobody → Eliad Cohen (eliadcohen)
Revision history for this message
Martin Kopec (mkopec) wrote :

while review traiging I stumbled upon a review which tried to address this LP before the latest patch (857756). I'm just gonna make a note of that patch here if needed for any future reference ...
https://review.opendev.org/c/openstack/tempest/+/685039

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by "Martin Kopec <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/tempest/+/685039
Reason: abandoning due to a long inactivity and the fact that there is a new patch trying to address the same bug, feel free to restore this if needed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.opendev.org/c/openstack/tempest/+/857756
Committed: https://opendev.org/openstack/tempest/commit/bec2d4daa00f66681043d582fc32d2a7a819c337
Submitter: "Zuul (22348)"
Branch: master

commit bec2d4daa00f66681043d582fc32d2a7a819c337
Author: Eliad Cohen <email address hidden>
Date: Wed Sep 14 17:52:59 2022 +0000

    Added functionality to wait for port creation

    Added a waiter that compares the current status
    of the port to a target value and returns the port
    when that is achieved.

    Closes-Bug: 1845486
    Change-Id: Ibc5434244f3758c60ddefa96d78476948a47ed13

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

This issue was fixed in the openstack/tempest 34.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.