Bug 1320586

Summary: test_preserve_preexisting_port fails
Product: Red Hat OpenStack Reporter: Arie Bregman <abregman>
Component: openstack-novaAssignee: Eoghan Glynn <eglynn>
Status: CLOSED NOTABUG QA Contact: nlevinki <nlevinki>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0 (Juno)CC: berrange, dasmith, eglynn, kchamart, ndipanov, sbauza, sferdjao, sgordon, vromanso, yeylon
Target Milestone: ---   
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-24 16:51:47 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:

Description Arie Bregman 2016-03-23 14:45:36 UTC
Description of problem:
Running tempest tests on OSP 6 (&5) fails for 'tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_preserve_preexisting_port' 

Although tempest.conf includes -> preserve_ports = false

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

How reproducible: 100%

Steps to Reproduce:
1. Deploy OSP 6 with Packstack (all-in-one or multi-node)
2. Run tempest test: tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_preserve_preexisting_port

Actual results:

Traceback (most recent call last):
  File "/home/cloud-user/tempest-dir/tempest/test.py", line 113, in wrapper
    return f(self, *func_args, **func_kwargs)
  File "/home/cloud-user/tempest-dir/tempest/scenario/test_network_basic_ops.py", line 661, in test_preserve_preexisting_port
    port = self.ports_client.show_port(port_id)['port']
  File "/home/cloud-user/tempest-dir/tempest/lib/services/network/ports_client.py", line 30, in show_port
    return self.show_resource(uri, **fields)
  File "/home/cloud-user/tempest-dir/tempest/lib/services/network/base.py", line 52, in show_resource
    resp, body = self.get(req_uri)
  File "/home/cloud-user/tempest-dir/tempest/lib/common/rest_client.py", line 274, in get
    return self.request('GET', url, extra_headers, headers)
  File "/home/cloud-user/tempest-dir/tempest/lib/common/rest_client.py", line 642, in request
    resp, resp_body)
  File "/home/cloud-user/tempest-dir/tempest/lib/common/rest_client.py", line 695, in _error_checker
    raise exceptions.NotFound(resp_body, resp=resp)
NotFound: Object not found
Details: {u'message': u'Port 45aa47b4-4ff3-4436-b0fc-a58ba8fb8679 could not be found', u'type': u'PortNotFound', u'detail': u''}

Expected results:
Test passed (or skipped?)

Additional info:
Maybe this should be backported?: https://review.openstack.org/#/c/126309

Comment 3 Artom Lifshitz 2016-03-24 16:51:47 UTC
The preserve_ports flag has been reverted from Tempest now that Juno is EOL upstream [1].

The correct solution is to use an "older" Tempest for testing RHOS 6 and RHOS 5. There's a proposed patch [2] to Khaleesi that would implement that. Once this patch merges, this bug should go away.

[1] https://github.com/openstack/tempest/commit/fe3343768144080c42c88f9bd23edd065f84c427
[2] https://review.gerrithub.io/#/c/270326/