Bug 1488339

Summary: TripleO doesn't install the trunk service plugin when deployed with OVN
Product: Red Hat OpenStack Reporter: Eran Kuris <ekuris>
Component: openstack-tripleo-heat-templatesAssignee: Assaf Muller <amuller>
Status: CLOSED ERRATA QA Contact: Eran Kuris <ekuris>
Severity: medium Docs Contact:
Priority: high    
Version: 12.0 (Pike)CC: apevec, dalvarez, jschluet, lhh, majopela, mburns, nyechiel, rhel-osp-director-maint
Target Milestone: Upstream M1Keywords: AutomationBlocker, Triaged
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.0.2-0.20180327213843.f25e2d8.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1537606 (view as bug list) Environment:
Last Closed: 2018-06-27 13:36:15 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:
Bug Depends On:    
Bug Blocks: 1537606    
Attachments:
Description Flags
log none

Description Eran Kuris 2017-09-05 08:04:07 UTC
Created attachment 1322106 [details]
log

Description of problem:
Vlan aware VM tests neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_subport_connectivity
neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_trunk_subport_lifecycle
Failed with following traceback

Traceback (most recent call last):
  File "/home/centos/tempest-upstream/neutron/neutron/tests/tempest/scenario/test_trunk.py", line 162, in test_trunk_subport_lifecycle
    server1 = self._create_server_with_trunk_port()
  File "/home/centos/tempest-upstream/neutron/neutron/tests/tempest/scenario/test_trunk.py", line 68, in _create_server_with_trunk_port
    trunk = self.client.create_trunk(port['id'], subports=[])['trunk']
  File "/home/centos/tempest-upstream/neutron/neutron/tests/tempest/services/network/json/network_client.py", line 765, in create_trunk
    resp, body = self.post(uri, self.serialize(post_data))
  File "tempest/lib/common/rest_client.py", line 270, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "tempest/lib/common/rest_client.py", line 659, in request
    self._error_checker(resp, resp_body)
  File "tempest/lib/common/rest_client.py", line 765, in _error_checker
    raise exceptions.NotFound(resp_body, resp=resp)
tempest.lib.exceptions.NotFound: Object not found
Details: {u'message': u'The resource could not be found.', u'type': u'HTTPNotFound', u'detail': u''}



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

openvswitch-ovn-common-2.7.2-4.git20170719.el7fdp.x86_64
python-networking-ovn-3.0.0-0.20170807061656.2425483.el7ost.noarch
openvswitch-ovn-host-2.7.2-4.git20170719.el7fdp.x86_64
puppet-ovn-11.3.0-0.20170805080331.4425658.el7ost.noarch
openvswitch-ovn-central-2.7.2-4.git20170719.el7fdp.x86_64


How reproducible:
always

Steps to Reproduce:
1.Deploy OSP12 HA setup with OVN 
2. Run Neutron Vlan aware Vm Tests:
neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_subport_connectivity
neutron.tests.tempest.scenario.test_trunk.TrunkTest.test_trunk_subport_lifecycle
3.

Actual results:
Tests failed

Expected results:
Tests should pass

Additional info:

Comment 1 Eran Kuris 2017-09-05 10:45:28 UTC
This test failed too with the same error: 
neutron.tests.tempest.api.test_trunk

Comment 2 Assaf Muller 2017-09-11 19:16:59 UTC
I looked at one of the controllers and it doesn't have 'trunk' in the list of neutron.conf:default:service_plugins, that's why the trunk tests are failing with error 404 not found.

Comment 3 Assaf Muller 2017-09-11 19:23:32 UTC
This is because TripleO, when deployed with OVN, sets the following service_plugins:

https://github.com/openstack/tripleo-heat-templates/blob/efc9a3bc7e02173b2c9976dbe23933cba7ede41f/environments/services-docker/neutron-ovn-ha.yaml#L24

Inlined:
NeutronServicePlugins: 'qos,ovn-router'

This is a specific case of a generic issue: If you configure l2gw/bgpvpn/ovn/odl/other "advanced" TripleO environment files override service_plugins (And ml2 mech drivers for that matter), the last environment file that you include will override the service_plugins / mech_drivers stated by the other environment files. So if you include both OVN and Octavia for example, one will override the other. The operator is presently supposed to manually merge all environment files, as the supplied environment files are considered examples. Brent proposed a mechanism to merge attributes like service_plugins instead of having the last environment file override all previous values.

For this specific issue we can workaround it in either the OVN environment file or in CI.

Comment 8 Eran Kuris 2018-04-16 11:55:10 UTC
Fixed in : 
13   -p 2018-04-10.2
openstack-tripleo-heat-templates-8.0.2-0.20180327213846.el7ost.noarch

Comment 10 errata-xmlrpc 2018-06-27 13:36:15 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/RHEA-2018:2086