Creating a vlan enabled network with the value of 0 as the segmentation-id will prevent the network from being deleted.

Solution In Progress - Updated -

Issue

(overcloud) [stack@director ~]$ openstack network show 9d70f35f-70f8-420f-b668-dd62220a6835
+---------------------------+--------------------------------------+
| Field                     | Value                                |
+---------------------------+--------------------------------------+
| admin_state_up            | UP                                   |
| availability_zone_hints   |                                      |
| availability_zones        |                                      |
| created_at                | 2021-04-27T17:00:21Z                 |
| description               |                                      |
| dns_domain                | None                                 |
| id                        | 9d70f35f-70f8-420f-b668-dd62220a6835 |
| ipv4_address_scope        | None                                 |
| ipv6_address_scope        | None                                 |
| is_default                | None                                 |
| is_vlan_transparent       | None                                 |
| mtu                       | 9000                                 |
| name                      | testspgwsriov-1-1-flat               |
| port_security_enabled     | True                                 |
| project_id                | 5a5416fc7b574c4d839a777587b6d6c4     |
| provider:network_type     | vlan                                 |
| provider:physical_network | sriov-1-1                            |
| provider:segmentation_id  | 0                                    |
| qos_policy_id             | None                                 |
| revision_number           | 12                                   |
| router:external           | Internal                             |
| segments                  | None                                 |
| shared                    | True                                 |
| status                    | ACTIVE                               |
| subnets                   |                                      |
| tags                      |                                      |
| updated_at                | 2021-04-28T07:29:17Z                 |
+---------------------------+--------------------------------------+
  • This causes problem if we try to delete it:
Manager unknown ran task network.GET.networks in 1.06082701683s
Manager unknown running task network.DELETE.networks
REQ: curl -g -i -X DELETE https://public_api.localdomain:13696/v2.0/networks/9d70f35f-70f8-420f-b668-dd62220a6835 -H "User-Agent: osc-lib/1.9.0 keystoneauth1/3.4.0 python-requests/2.14.2 CPython/2.7.5" -H "Accept: " -H "X-Auth-Token: {SHA1}c81eae64c1db61b73c6ff0ee96ae62a24d3abce3"
https://public_api.localdomain:13696 "DELETE /v2.0/networks/9d70f35f-70f8-420f-b668-dd62220a6835 HTTP/1.1" 500 150
RESP: [500] Content-Type: application/json Content-Length: 150 X-Openstack-Request-Id: req-c3c2537b-d0b8-4f6b-bd37-a973ffb6f7fe Date: Thu, 29 Apr 2021 11:02:24 GMT
RESP BODY: {"NeutronError": {"message": "Request Failed: internal server error while processing your request.", "type": "HTTPInternalServerError", "detail": ""}}

and the following is seen in /var/log/containers/neutron/server.log:

/var/log/containers/neutron/server.log:2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation [req-c3c2537b-d0b8-4f6b-bd37-a973ffb6f7fe 85b1e9940f0a40b0a84f5f75e07c7e42 d46968d841b44d0a929d8554d54ff487 - default default] DELETE failed.: CallbackFailure: Callback neutron.services.segments.db._delete_segments_for_network--9223363280687445342 failed with "Callback neutron.plugins.ml2.plugin.Ml2Plugin._handle_segment_change--9223372036846956265 failed with "Field value 0 is invalid""
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation Traceback (most recent call last):
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/pecan/core.py", line 678, in __call__
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     self.invoke_controller(controller, args, kwargs, state)
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/pecan/core.py", line 569, in invoke_controller
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     result = controller(*args, **kwargs)
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron/db/api.py", line 91, in wrapped
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     setattr(e, '_RETRY_EXCEEDED', True)
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
--
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     self.force_reraise()
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     six.reraise(self.type_, self.value, self.tb)
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron_lib/db/utils.py", line 100, in _wrapped
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     return function(*args, **kwargs)
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation   File "/usr/lib/python2.7/site-packages/neutron_lib/callbacks/manager.py", line 155, in notify
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation     raise exceptions.CallbackFailure(errors=errors)
/var/log/containers/neutron/server.log-2021-04-29 11:02:24.963 34 ERROR neutron.pecan_wsgi.hooks.translation CallbackFailure: Callback neutron.services.segments.db._delete_segments_for_network--9223363280687445342 failed with "Callback neutron.plugins.ml2.plugin.Ml2Plugin._handle_segment_change--9223372036846956265 failed with "Field value 0 is invalid""
  • Could we get a procedure to delete the bad records from the DB? This is causing issues as our deployment flows are expecting to create and delete the networks.

Environment

  • Red Hat OpenStack Platform 13.0 (RHOSP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In