create port pair group error because port pair has no correlation

Bug #1855410 reported by Wei Hui
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-sfc
New
Undecided
Unassigned

Bug Description

[root@test25g04 huiwei]# openstack sfc port pair create --ingress sfc-port-p2 --egress sfc-port-p3 --service-function-parameters weight=1 port-pair-1
+-----------------------------+--------------------------------------+
| Field | Value |
+-----------------------------+--------------------------------------+
| Description | |
| Egress Logical Port | f309fd48-14fa-417e-8f60-bb3afa712fc2 |
| ID | 25e25a59-1c9d-4c6b-902d-2bce530fa640 |
| Ingress Logical Port | 5a5a289f-68d3-4169-9850-dc922649916e |
| Name | port-pair-1 |
| Project | 02c0f9589cca400abd623868516c209b |
| Service Function Parameters | {u'weight': 1} |
| tenant_id | 02c0f9589cca400abd623868516c209b |
+-----------------------------+--------------------------------------+
[root@test25g04 huiwei]# openstack sfc port pair create --ingress sfc-port-p4 --egress sfc-port-p5 --service-function-parameters weight=2 port-pair-2
+-----------------------------+--------------------------------------+
| Field | Value |
+-----------------------------+--------------------------------------+
| Description | |
| Egress Logical Port | a72eb67c-3617-4c55-9861-fb8d38293cfe |
| ID | 8e146c43-4504-46ad-a024-24156fcd2cd0 |
| Ingress Logical Port | 82826950-343f-430b-8077-eac17f5e8730 |
| Name | port-pair-2 |
| Project | 02c0f9589cca400abd623868516c209b |
| Service Function Parameters | {u'weight': 2} |
| tenant_id | 02c0f9589cca400abd623868516c209b |
+-----------------------------+--------------------------------------+
[root@test25g04 huiwei]# openstack sfc port pair create --ingress sfc-port-p6 --egress sfc-port-p7 port-pair-3
+-----------------------------+--------------------------------------+
| Field | Value |
+-----------------------------+--------------------------------------+
| Description | |
| Egress Logical Port | fd151f25-b733-44ad-85bf-1f3a1f1af237 |
| ID | 6e4d53a2-cf86-4c31-bb31-9caefc0e629b |
| Ingress Logical Port | 44589e56-db12-498c-8645-b3b5400dd5fd |
| Name | port-pair-3 |
| Project | 02c0f9589cca400abd623868516c209b |
| Service Function Parameters | {u'weight': 1, u'correlation': None} |
| tenant_id | 02c0f9589cca400abd623868516c209b |
+-----------------------------+--------------------------------------+
[root@test25g04 huiwei]# openstack sfc port pair create --ingress sfc-port-p8 --egress sfc-port-p9 port-pair-4
+-----------------------------+--------------------------------------+
| Field | Value |
+-----------------------------+--------------------------------------+
| Description | |
| Egress Logical Port | 5d369f8b-aae2-436d-9385-365d069fb11e |
| ID | 5aa3918c-bf7e-4d9b-a8d2-18cf4df89227 |
| Ingress Logical Port | e3b6f600-e347-4a7d-82c4-7b1f42b61e70 |
| Name | port-pair-4 |
| Project | 02c0f9589cca400abd623868516c209b |
| Service Function Parameters | {u'weight': 1, u'correlation': None} |
| tenant_id | 02c0f9589cca400abd623868516c209b |
+-----------------------------+--------------------------------------+
[root@test25g04 huiwei]# openstack sfc port pair group create --port-pair port-pair-1 --port-pair port-pair-2 --port-pair-group-parameters lb-fields=ip_dst port-pair-group-1
Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-b21aacaa-b630-447f-aaba-62375964c012']

###########################################################################################################

DEFAULT_SF_PARAMETERS = {'correlation': None, 'weight': 1}

def normalize_sf_parameters(parameters):
    return parameters if parameters else DEFAULT_SF_PARAMETERS

openstack sfc port pair create --ingress sfc-port-p2 --egress sfc-port-p3 --service-function-parameters weight=1 port-pair-1
parameter --service-function-parameters is a dict, if it short of some keys, function normalize_sf_parameters will not set default value for those keys.

Wei Hui (huiweics)
Changed in networking-sfc:
assignee: nobody → Wei Hui (huiweics)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-sfc (master)

Fix proposed to branch: master
Review: https://review.opendev.org/697629

Changed in networking-sfc:
status: New → In Progress
Revision history for this message
Wei Hui (huiweics) wrote :
Download full text (7.1 KiB)

server.log:626367:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource [req-0754b937-2ae8-4289-9926-2b3ed1a4bc6a a7ad28c934a84cdca96ba47623110949 02c0f9589cca400abd623868516c209b - default default] create failed: No details.: KeyError: 'correlation'
server.log:626368:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource Traceback (most recent call last):
server.log:626369:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/resource.py", line 98, in resource
server.log:626370:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource result = method(request=request, **args)
server.log:626371:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron/api/v2/base.py", line 436, in create
server.log:626372:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource return self._create(request, body, **kwargs)
server.log:626373:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 139, in wrapped
server.log:626374:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
server.log:626375:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
server.log:626376:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource self.force_reraise()
server.log:626377:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
server.log:626378:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
server.log:626379:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/neutron_lib/db/api.py", line 135, in wrapped
server.log:626380:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource return f(*args, **kwargs)
server.log:626381:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 154, in wrapper
server.log:626382:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource ectxt.value = e.inner_exc
server.log:626383:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
server.log:626384:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource self.force_reraise()
server.log:626385:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
server.log:626386:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
server.log:626387:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/python2.7/site-packages/oslo_db/api.py", line 142, in wrapper
server.log:626388:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource return f(*args, **kwargs)
server.log:626389:2019-12-06 06:48:06.390 40 ERROR neutron.api.v2.resource File "/usr/lib/pyt...

Read more...

Revision history for this message
Slawek Kaplonski (slaweq) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in networking-sfc:
assignee: Wei Hui (huiweics) → nobody
status: In Progress → New
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on networking-sfc (master)

Change abandoned by "Rodolfo Alonso <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/networking-sfc/+/697629
Reason: If needed, feel free to restore the patch

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.