Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-12907

BZ#2247268 test_floatingip_port_details fails when there are custom availability zones

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Committed
    • No Docs Impact
    • Committed
    • Committed
    • None
    • 3

      Description of problem:
      test_floatingip_port_details checks device_owner port field with a hard-coded default value of 'compute:nova'
      In case there are custom availability zones the test fails with something like:

      Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/neutron_tempest_plugin/scenario/test_floatingip.py", line 246, in test_floatingip_port_details
      self._check_port_details(
      File "/usr/lib/python3.9/site-packages/neutron_tempest_plugin/scenario/test_floatingip.py", line 275, in _check_port_details
      self.assertEqual(device_owner, port_details['device_owner'])
      File "/usr/lib/python3.9/site-packages/testtools/testcase.py", line 391, in assertEqual
      self.assertThat(observed, matcher, message)
      File "/usr/lib/python3.9/site-packages/testtools/testcase.py", line 478, in assertThat
      raise mismatch_error
      testtools.matchers._impl.MismatchError: 'compute:nova' != 'compute:ovn-migration-zone-1'

      Version-Release number of selected component (if applicable):
      RHOS-17.1-RHEL-9-20230925.n.1
      python3-neutron-tests-tempest-2.1.0-1.20230508090955.el9ost.noarch

      How reproducible:
      100% in case availability zones have names different from default compute:nova

      Steps to Reproduce:
      1. Deploy OSP environment
      2. Create custom availability zones (see example below) note: my environment had 4 compute nodes but it's possible to reproduce the same issue with 2 compute nodes as well

      openstack aggregate create --zone ovn-migration-zone-0 ovn-migration-agg-0
      openstack aggregate add host ovn-migration-agg-0 compute-0.redhat.local
      openstack aggregate add host ovn-migration-agg-0 compute-1.redhat.local
      openstack aggregate create --zone ovn-migration-zone-1 ovn-migration-agg-1
      openstack aggregate add host ovn-migration-agg-1 compute-2.redhat.local
      openstack aggregate add host ovn-migration-agg-1 compute-3.redhat.local

      After this we have this:
      (overcloud) [stack@undercloud-0 tempest_17.1]$ openstack host list
      --------------------------------------------------------

      Host Name Service Zone

      --------------------------------------------------------

      controller-2.redhat.local conductor internal
      controller-2.redhat.local scheduler internal
      controller-0.redhat.local scheduler internal
      controller-1.redhat.local scheduler internal
      controller-0.redhat.local conductor internal
      controller-1.redhat.local conductor internal
      compute-0.redhat.local compute ovn-migration-zone-0
      compute-1.redhat.local compute ovn-migration-zone-0
      compute-3.redhat.local compute ovn-migration-zone-1
      compute-2.redhat.local compute ovn-migration-zone-1

      --------------------------------------------------------

      3. run tempest test neutron_tempest_plugin.scenario.test_floatingip.FloatingIPPortDetailsTest.test_floatingip_port_details

      Actual results:
      test_floatingip_port_details fails when there are custom availability zones
      with MismatchError e.g.
      testtools.matchers._impl.MismatchError: 'compute:nova' != 'compute:ovn-migration-zone-1'

      Expected results:
      test_floatingip_port_details is passing even when custom availability zones are configured

      Additional info:

      For a reference, without custom availability zones config (i.e. by default) this output is as follows:
      (overcloud) [stack@undercloud-0 tempest_17.1]$ openstack host list
      --------------------------------------------

      Host Name Service Zone

      --------------------------------------------

      controller-2.redhat.local conductor internal
      controller-2.redhat.local scheduler internal
      controller-0.redhat.local scheduler internal
      controller-1.redhat.local scheduler internal
      controller-0.redhat.local conductor internal
      controller-1.redhat.local conductor internal
      compute-0.redhat.local compute nova
      compute-1.redhat.local compute nova
      compute-3.redhat.local compute nova
      compute-2.redhat.local compute nova

      --------------------------------------------

              romansaf Roman Safronov
              jira-bugzilla-migration RH Bugzilla Integration
              Eran Kuris Eran Kuris
              rhos-dfg-networking-squad-neutron
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: