← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2067400] Re: neutron.tests.functional.services.trunk.drivers.ovn.test_trunk_driver.TestOVNTrunkDriver.test_subport_delete fails at self.assertCountEqual(ovn_subports_info, neutron_subports_info)

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/921296
Committed: https://opendev.org/openstack/neutron/commit/784e73729547d6af3d93a9d9fc4d45726c82dc17
Submitter: "Zuul (22348)"
Branch:    master

commit 784e73729547d6af3d93a9d9fc4d45726c82dc17
Author: Miguel Lavalle <mlavalle@xxxxxxxxxx>
Date:   Tue Jun 4 09:52:20 2024 -0500

    Fix trunk test_subport_delete functional test
    
    This change fixes a race condition between deleting a subport in the
    trunk plugin and the actual deletion in the OVN NBDB.
    
    Change-Id: I836d47a1879d474c2171905416a2838cfe3bab5a
    Closes-Bug: #2067400


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2067400

Title:
  neutron.tests.functional.services.trunk.drivers.ovn.test_trunk_driver.TestOVNTrunkDriver.test_subport_delete
  fails at  self.assertCountEqual(ovn_subports_info,
  neutron_subports_info)

Status in neutron:
  Fix Released

Bug description:
  ft1.3: neutron.tests.functional.services.trunk.drivers.ovn.test_trunk_driver.TestOVNTrunkDriver.test_subport_deletetesttools.testresult.real._StringException: Traceback (most recent call last):
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/base.py", line 178, in func
      return f(self, *args, **kwargs)
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/functional/services/trunk/drivers/ovn/test_trunk_driver.py", line 146, in test_subport_delete
      self._verify_trunk_info(new_trunk, has_items=False)
    File "/home/zuul/src/opendev.org/openstack/neutron/neutron/tests/functional/services/trunk/drivers/ovn/test_trunk_driver.py", line 96, in _verify_trunk_info
      self.assertCountEqual(ovn_subports_info, neutron_subports_info)
    File "/usr/lib/python3.10/unittest/case.py", line 1206, in assertCountEqual
      self.fail(msg)
    File "/usr/lib/python3.10/unittest/case.py", line 675, in fail
      raise self.failureException(msg)
  AssertionError: Element counts were not equal:
  First has 1, Second has 0:  {'port_id': '1cca4b8b-01cb-4dd5-a825-e67f9cb1d1be', 'parent_port_id': ['df22fc8d-e0a6-4ac9-a6cc-3ae55e8b9a6b'], 'tag': [1000], 'device_owner': 'trunk:subport', 'revision_number': '2'}

  The reason for this bug is that the OVN trunk driver processes
  subports deletes as a post commit event. Sometimes, when the test
  checks if the subport has been deleted from the OVN NBDB, the event
  hasn'r been processed yet by the driver. Solution will be to add a
  dekay in the test between the action of deleting the subport and
  checking in the OVN NBDB

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2067400/+subscriptions



References