L2 Gateway create connection fails

Bug #1450941 reported by Sukhdev Kapur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-l2gw
Incomplete
Undecided
selvakumar

Bug Description

This is a new failure in l2-gateway-connection-create when a segmentation ID is specified.

Here is the log of failure - It seems like a simple programming error. I commented out the faulty code, but it seem int(seg_id) is incorrectly used.

2015-04-30 16:58:30.754 DEBUG neutron.api.v2.base [req-dfdb69ba-4f52-47ab-bd8e-e2fe00e017e1 admin 26039ca9ae7a4f30a4dbc8f34e0c4fd7] Request body: {u'l2_gateway_connection': {u'network_id': u'f0e7f8d2-a1a3-4a66-9c01-3dff4710b041', u'segmen
tation_id': u'segmentation-id=5', u'l2_gateway_id': u'f2ef955c-f9c6-4390-a48b-0f0ba527922f'}} from (pid=21339) prepare_request_body /opt/stack/neutron/neutron/api/v2/base.py:597
2015-04-30 16:58:30.756 DEBUG neutron.api.v2.base [req-dfdb69ba-4f52-47ab-bd8e-e2fe00e017e1 admin 26039ca9ae7a4f30a4dbc8f34e0c4fd7] Unknown quota resources ['l2_gateway_connection']. from (pid=21339) create /opt/stack/neutron/neutron/api/
v2/base.py:424
2015-04-30 16:58:30.824 ERROR neutron.api.v2.resource [req-dfdb69ba-4f52-47ab-bd8e-e2fe00e017e1 admin 26039ca9ae7a4f30a4dbc8f34e0c4fd7] create failed
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource Traceback (most recent call last):
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 83, in resource
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource result = method(request=request, **args)
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 461, in create
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource obj = obj_creator(request.context, **kwargs)
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource File "/opt/stack/networking-l2gw/networking_l2gw/services/l2gateway/plugin.py", line 547, in create_l2_gateway_connection
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource self._validate_connection(context, gw_connection)
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource File "/opt/stack/networking-l2gw/networking_l2gw/services/l2gateway/plugin.py", line 355, in _validate_connection
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource l2gw_validators.validate_network_mapping_list(nw_map, check_vlan)
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource File "/opt/stack/networking-l2gw/networking_l2gw/services/l2gateway/common/l2gw_validators.py", line 75, in validate_network_mapping_list
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource is_valid_vlan_id(seg_id)
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource File "/opt/stack/networking-l2gw/networking_l2gw/services/l2gateway/common/l2gw_validators.py", line 103, in is_valid_vlan_id
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource if int_seg_id <= 0 or int_seg_id >= 4095:
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource UnboundLocalError: local variable 'int_seg_id' referenced before assignment
2015-04-30 16:58:30.824 TRACE neutron.api.v2.resource
2015-04-30 16:58:30.827 INFO neutron.wsgi [req-dfdb69ba-4f52-47ab-bd8e-e2fe00e017e1 admin 26039ca9ae7a4f30a4dbc8f34e0c4fd7] 172.24.56.54 - - [30/Apr/2015 16:58:30] "POST /v2.0/l2-gateway-connections.json HTTP/1.1" 500 359 0.075893
2015-04-30 16:58:41.369 DEBUG oslo_messaging._drivers.amqp [-] unpacked context: {u'read_only': False, u'domain': None, u'project_name': None, u'user_id': None, u'show_deleted': False, u'roles': [u'admin'], u'user_identity': u'- - - - -', u'project_domain': None, u'tenant_name': None, u'auth_token': None, u'resource_uuid': None, u'project_id': None, u'tenant_id': None, u'is_admin': True, u'user': None, u'request_id': u'req-f7052fa2-1fc7-45a9-8456-853775da3867', u'tenant': None, u'user_domain': None, u'timestamp': u'2015-04-30 18:08:45.298445', u'read_deleted': u'no', u'user_name': None} from (pid=21339) unpack_context /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqp.py:171

Maruti Kamat (marutik)
Changed in networking-l2gw:
assignee: nobody → Maruti Kamat (marutik)
Revision history for this message
selvakumar (selvakumar-nms) wrote :

I wonder how the value of segmentation_id passed as " u'segmentation_id': u'segmentation-id=5' "
Ideally it should be u'segmentation_id': u'5' it should be valid integer.

Hope we should use the connection create command like below,
neutron l2-gateway-connection-create gw1 private --default-segmentation-id 5

However we are throwing the error if we pass invalid integer during the connection create.
"Invalid input for operation: segmentation_id should be a valid integer.

Maruti Kamat (marutik)
Changed in networking-l2gw:
assignee: Maruti Kamat (marutik) → selvakumar (selvakumar-s2)
Maruti Kamat (marutik)
Changed in networking-l2gw:
status: New → Incomplete
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.