← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1914842] Re: Create vlan network will get 500 error when enable network_segment_range service plugin

 

Reviewed:  https://review.opendev.org/c/openstack/neutron/+/774375
Committed: https://opendev.org/openstack/neutron/commit/fa7c7282f019d3e0dd4d492f5ff2c47bd45b0ce7
Submitter: "Zuul (22348)"
Branch:    master

commit fa7c7282f019d3e0dd4d492f5ff2c47bd45b0ce7
Author: yangjianfeng <yjf1970231893@xxxxxxxxx>
Date:   Sun Feb 7 09:59:07 2021 +0000

    Make phynet paramter also is optional when network_segment_range enabled
    
    When network_segment_range plugin is not enabled, we can create a provider
    network without physical_network parameter. In order to compatibility,
    We should support to not provide physical_network parameter when create
    provider network with network_segment_range plugin enabled.
    
    Closes-Bug: #1914842
    Change-Id: If19a6a9b0f2910baefba9d7ea9955b1f0ad7d252


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1914842

Title:
  Create vlan network will get 500 error when enable
  network_segment_range service plugin

Status in neutron:
  Fix Released

Bug description:
  version: stable/ussuri
  Confiure neutron to enable network_segment_range and support vlan tenant vlan

  The execute the cmd below:
  openstack network create test-vlan02 --provider-network-type vlan

  The error I got:
  Error while executing command: HttpException: 500, Request Failed: internal server error while processing your request.

  Check neutron-server log file, the error info like below:
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation [req-47fa7919-8b0c-4a7e-934b-a9dc7945070f fa92f1c6cea54f59bc5c08538db58082 73153acfd693497bb76f6b6d5d9a40ee - default default] POST failed.: KeyError: 'physical_network'
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation Traceback (most recent call last):
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/pecan/core.py", line 683, in __call__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.invoke_controller(controller, args, kwargs, state)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/pecan/core.py", line 574, in invoke_controller
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     result = controller(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 139, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     setattr(e, '_RETRY_EXCEEDED', True)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     raise value
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 135, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_db/api.py", line 154, in wrapper
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     ectxt.value = e.inner_exc
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     raise value
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_db/api.py", line 142, in wrapper
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 183, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     LOG.debug("Retry wrapper got retriable exception: %s", e)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     raise value
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 179, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*dup_args, **dup_kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/pecan_wsgi/controllers/utils.py", line 76, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/pecan_wsgi/controllers/resource.py", line 163, in post
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return self.create(resources)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/pecan_wsgi/controllers/resource.py", line 181, in create
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return {key: creator(*creator_args, **creator_kwargs)}
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/common/utils.py", line 687, in inner
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(self, context, *args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 233, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return method(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 139, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     setattr(e, '_RETRY_EXCEEDED', True)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     raise value
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 135, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_db/api.py", line 154, in wrapper
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     ectxt.value = e.inner_exc
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     raise value
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_db/api.py", line 142, in wrapper
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*args, **kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 183, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     LOG.debug("Retry wrapper got retriable exception: %s", e)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     raise value
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron_lib/db/api.py", line 179, in wrapped
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     return f(*dup_args, **dup_kwargs)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py", line 1053, in create_network
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     result, mech_context = self._create_network_db(context, network)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/plugins/ml2/plugin.py", line 1012, in _create_network_db
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     tenant_id)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/plugins/ml2/managers.py", line 216, in create_network_segments
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     context, segment, filters=filters)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/plugins/ml2/managers.py", line 301, in reserve_provider_segment
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     segment, filters)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/plugins/ml2/drivers/type_vlan.py", line 276, in reserve_provider_segment
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     context, **filters)
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/plugins/ml2/drivers/helpers.py", line 144, in allocate_partially_specified_segment
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     allocations = call()
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python3.6/site-packages/neutron/objects/network_segment_range.py", line 196, in get_segments_shared
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation     _filters['physical_network'])
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation KeyError: 'physical_network'
  2021-02-06 10:45:12.944 25 ERROR neutron.pecan_wsgi.hooks.translation

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1914842/+subscriptions


References