Bug 1572578

Summary: QuotasTest.test_detail_quotas failing for OVN
Product: Red Hat OpenStack Reporter: Lucas Alvares Gomes <lmartins>
Component: python-neutron-tests-tempestAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: amuller, apevec, dalvarez, ekuris, jjoyce, joflynn, jschluet, lhh, lmartins, majopela, nyechiel, oblaut
Target Milestone: z2Keywords: Automation, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-neutron-tests-tempest-0.0.1-0.20180419105838.f33d59b.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-29 16:20:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lucas Alvares Gomes 2018-04-27 10:45:38 UTC
Description of problem:

The tempest test neutron_tempest_plugin.api.admin.test_quotas.QuotasTest.test_detail_quotas is failing for OVN with:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tempest/common/utils/__init__.py", line 107, in wrapper
    return func(*func_args, **func_kwargs)
  File "/usr/lib/python2.7/site-packages/neutron_tempest_plugin/api/admin/test_quotas.py", line 145, in test_detail_quotas
    quota_set[key]['used'])
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 1 != 2

The reason of the failure has to deal with the networking-ovn's metadata implementation. Basically, when metadata is enabled (and it's for the CI) and we create a network resource for OVN, networking-ovn will also allocate a port to be used by the metadata agent [0].

That port will deduct 1 from the user's quota for ports and that is causing the difference there which is making the test fail.

...

Since this is an API test (that runs when the quota_details API extension for neutron is enabled) I think that there's little to us to do to fix it without having to do a big refactor in the networking-ovn's code, which I don't think is worth of it to fix this test.

Perhaps, disabling that extension in the CI for now would be the easiest way to deal with the problem.

[0] https://github.com/openstack/networking-ovn/blob/4a5b0564de38d0d43d821dc8d8d21faba9589a8d/networking_ovn/common/ovn_client.py#L1154


Version-Release number of selected component (if applicable):

OSP 13.0

Comment 3 Lucas Alvares Gomes 2018-04-27 13:28:27 UTC
The patch [0] uses a different approach and calculates the number of used ports on that test after the network has been created. Perhaps that's more generic and doesn't require disabling the test or the extension for OVN. 

[0] https://review.openstack.org/#/c/564757/

Comment 4 Lucas Alvares Gomes 2018-04-27 13:29:06 UTC
The patch [0] uses a different approach and calculates the number of used ports on that test after the network has been created. Perhaps that's more generic and doesn't require disabling the test or the extension for OVN. 

[0] https://review.openstack.org/#/c/564757/

Comment 5 Lucas Alvares Gomes 2018-05-16 13:42:57 UTC
*** Bug 1575844 has been marked as a duplicate of this bug. ***

Comment 6 Daniel Alvarez Sanchez 2018-05-21 08:28:50 UTC
Patch is merged upstream

Comment 16 Eran Kuris 2018-08-08 06:00:43 UTC
Fix verified on osp13z2 
13.0-RHEL-7/2018-08-03.3

python2-neutron-tests-tempest-0.0.1-0.20180425142843.02a5e2b.el7ost.noarch

https://rhos-qe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/DFG/view/network/view/networking-ovn/job/DFG-network-networking-ovn-13_director-rhel-virthost-3cont_2comp-ipv4-geneve/139/testReport/neutron_tempest_plugin.api.admin.test_quotas/QuotasTest/tes
t_detail_quotas_gate_id_e974b5ba_090a_452c_a578_f9710151d9fc_/

Comment 17 Joanne O'Flynn 2018-08-13 14:18:44 UTC
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible.

If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-".


To add draft documentation text:

* Select the documentation type from the "Doc Type" drop down field.

* A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.

Comment 18 Lucas Alvares Gomes 2018-08-13 14:23:22 UTC
(In reply to Joanne O'Flynn from comment #17)
> This bug is marked for inclusion in the errata but does not currently
> contain draft documentation text. To ensure the timely release of this
> advisory please provide draft documentation text for this bug as soon as
> possible.
> 
> If you do not think this bug requires errata documentation, set the
> requires_doc_text flag to "-".
> 
> 
> To add draft documentation text:
> 
> * Select the documentation type from the "Doc Type" drop down field.
> 
> * A template will be provided in the "Doc Text" field based on the "Doc
> Type" value selected. Enter draft text in the "Doc Text" field.

Thanks Joanne,

This bug is only related to a test run so I don't think it needs any documentation about it. I've set the requires_doc_text flag to "-" as requested for this case.

Comment 20 errata-xmlrpc 2018-08-29 16:20:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2596