2017-08-21 14:22:56.783 ERROR networking_opencontrail.ml2.mech_driver [req-4a454d3a-ef31-42bd-b4cf-903698e496c2 admin admin] Create Network Failed: BadRequest: Bad virtual_network request: Segmenation id must be configured.
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver Traceback (most recent call last):
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver File "/usr/local/lib/python2.7/dist-packages/networking_opencontrail/ml2/mech_driver.py", line 50, in create_network_postcommit
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver self.drv.create_network(context._plugin_context, network)
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver File "/usr/local/lib/python2.7/dist-packages/networking_opencontrail/drivers/contrail_driver_base.py", line 134, in create_network
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver return self._create_resource('network', context, network)
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver File "/usr/local/lib/python2.7/dist-packages/networking_opencontrail/drivers/drv_opencontrail.py", line 251, in _create_resource
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver obj_name=res_type)
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver File "/usr/local/lib/python2.7/dist-packages/networking_opencontrail/drivers/drv_opencontrail.py", line 234, in _transform_response
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver driver_base._raise_contrail_error(info, obj_name)
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver File "/usr/local/lib/python2.7/dist-packages/networking_opencontrail/drivers/contrail_driver_base.py", line 64, in _raise_contrail_error
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver raise getattr(neutron_lib_exc, exc_name)(**info)
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver BadRequest: Bad virtual_network request: Segmenation id must be configured.
2017-08-21 14:22:56.783 TRACE networking_opencontrail.ml2.mech_driver
Field provider:segmentation_id is not required by Neutron and also isn't assigned when network is created. After performing said steps network is available and operable in OpenStack, but Contrail refused to create it on its side.
I have issued the following command:
neutron net-create public --shared --provider: physical_ network public --provider: network_ type flat
which produced the following network dictionary passed to Contrail: {'provider: physical_ network' : u'public', 'updated_at': '2017-08- 21T14:22: 56Z', 'revision_number': 3, 'port_security_ enabled' : True, 'provider: network_ type': u'flat', 'id': '8897cdac- 7f56-4b87- a75b-219119d0d1 00', 'router:external': False, 'availability_ zone_hints' : [], 'availability_ zones': [], 'ipv4_address_ scope': None, 'shared': True, 'project_id': u'3b598c589eb34 bceb14ef13c2a26 3e6c', 'status': 'ACTIVE', 'subnets': [], 'description': '', 'tags': [], 'ipv6_address_ scope': None, 'provider: segmentation_ id': None, 'name': u'public', 'admin_state_up': True, 'tenant_id': u'3b598c589eb34 bceb14ef13c2a26 3e6c', 'created_at': '2017-08- 21T14:22: 56Z', 'mtu': 1500, 'vlan_transparent': None}.
Contrail responded with error. Log says:
2017-08-21 14:22:56.783 ERROR networking_ opencontrail. ml2.mech_ driver [req-4a454d3a- ef31-42bd- b4cf-903698e496 c2 admin admin] Create Network Failed: BadRequest: Bad virtual_network request: Segmenation id must be configured. opencontrail. ml2.mech_ driver Traceback (most recent call last): opencontrail. ml2.mech_ driver File "/usr/local/ lib/python2. 7/dist- packages/ networking_ opencontrail/ ml2/mech_ driver. py", line 50, in create_ network_ postcommit opencontrail. ml2.mech_ driver self.drv. create_ network( context. _plugin_ context, network) opencontrail. ml2.mech_ driver File "/usr/local/ lib/python2. 7/dist- packages/ networking_ opencontrail/ drivers/ contrail_ driver_ base.py" , line 134, in create_network opencontrail. ml2.mech_ driver return self._create_ resource( 'network' , context, network) opencontrail. ml2.mech_ driver File "/usr/local/ lib/python2. 7/dist- packages/ networking_ opencontrail/ drivers/ drv_opencontrai l.py", line 251, in _create_resource opencontrail. ml2.mech_ driver obj_name=res_type) opencontrail. ml2.mech_ driver File "/usr/local/ lib/python2. 7/dist- packages/ networking_ opencontrail/ drivers/ drv_opencontrai l.py", line 234, in _transform_response opencontrail. ml2.mech_ driver driver_ base._raise_ contrail_ error(info, obj_name) opencontrail. ml2.mech_ driver File "/usr/local/ lib/python2. 7/dist- packages/ networking_ opencontrail/ drivers/ contrail_ driver_ base.py" , line 64, in _raise_ contrail_ error opencontrail. ml2.mech_ driver raise getattr( neutron_ lib_exc, exc_name)(**info) opencontrail. ml2.mech_ driver BadRequest: Bad virtual_network request: Segmenation id must be configured. opencontrail. ml2.mech_ driver
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
2017-08-21 14:22:56.783 TRACE networking_
Field provider: segmentation_ id is not required by Neutron and also isn't assigned when network is created. After performing said steps network is available and operable in OpenStack, but Contrail refused to create it on its side.