neutron_tempest_plugin: test_floatingip_port_details occasionally fails

Bug #1792472 reported by Brian Haley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Brian Haley

Bug Description

neutron_tempest_plugin.scenario.test_floatingip.FloatingIPPortDetailsTest.test_floatingip_port_details occasionally fails in the check queue. An example:

http://logs.openstack.org/97/602097/2/check/neutron-tempest-plugin-scenario-linuxbridge/849d93e/testr_results.html.gz

Traceback (most recent call last):
  File "/opt/stack/neutron-tempest-plugin/neutron_tempest_plugin/scenario/test_floatingip.py", line 249, in test_floatingip_port_details
    fip, port, status='DOWN', device_id='', device_owner='')
  File "/opt/stack/neutron-tempest-plugin/neutron_tempest_plugin/scenario/test_floatingip.py", line 259, in _check_port_details
    self.assertEqual(status, port_details['status'])
  File "/opt/stack/tempest/.tox/tempest/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/tempest/.tox/tempest/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 'DOWN' != u'BUILD'

The strange thing is that BUILD is not a valid state for a floating IP, only ACTIVE, DOWN and ERROR are.

I believe this is due to this test using the compute API to get the floating IP state, it should instead use the neutron API if possible, for example get_floatingip(), so that a valid object is returned. I'll investigate changing the code.

Tags: tempest
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This checks the status of a port. "BUILD" is a valid status for a port associated with a floating IP, so BUILD is not surprising.

Revision history for this message
Brian Haley (brian-haley) wrote :

Right, it's the fip "port" in nova, since we're using the compute API to get the details, so it could just be in transition. But I think this should be asking neutron for the info, where BUILD is not a valid state for a floating IP. The other solution could be to have a while..true loop to check for 30 seconds to see if it goes to DOWN, then fail. That might actually be easier to implement.

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron-tempest-plugin (master)

Reviewed: https://review.openstack.org/602694
Committed: https://git.openstack.org/cgit/openstack/neutron-tempest-plugin/commit/?id=af347da20f17dbbafb59bc1c0bc39101e9a612e1
Submitter: Zuul
Branch: master

commit af347da20f17dbbafb59bc1c0bc39101e9a612e1
Author: Brian Haley <email address hidden>
Date: Fri Sep 14 11:24:00 2018 -0600

    Wait for floating IP to be DOWN before checking port details

    Occasionally test_floatingip_port_details() fails, showing
    the floating IP attached port status as 'BUILD'. Wait for the
    status to transition to 'DOWN' before checking other port details,
    similar as is done to the fixed IP port's device_id value.

    Changed afffected method to use constants for port status as well.

    Change-Id: I862115b37c97d5a3cad082d8cd4e7b855ef3f88b
    Closes-bug: #1792472

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

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