[2.1-Build 40] fq-name confilict was happened while creating physical interface by WebUI

Bug #1433498 reported by Daisuke Nakajima
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Fix Committed
High
Prakash Bailkeri
R2.1
Fix Committed
Undecided
Prakash Bailkeri

Bug Description

fq-name confilict was happened while creating physical interface by WebUI. All physical interfaces were deleted before re-creating physical interface.

There was no xe-0/0/6 on WebUI and /physical-interfaces on Rest API, however xe-0/0/6 was available on Zookeeper. Hence, following error message was shown on WebUI.
""FQ Name: /fq-name-to-uuid/physical_interface:default-global-system-config:QFX1:xe-0/0/6 exists already with ID: 5d59589b-a76e-4bb1-b84b-86fe5f801f63""

Also Zookeeper had following data;
ls /fq-name-to-uuid/physical_interface:default-global-system-config:QFX1:xe-0/0/6
[]

xe-0/0/6 was created successfully after deleting above data from Zookeeper.

Tags: config
Revision history for this message
Daisuke Nakajima (dnakajima) wrote :
information type: Proprietary → Public
Changed in juniperopenstack:
importance: Undecided → High
tags: added: config
Revision history for this message
Prakash Bailkeri (prakashmb) wrote :

"parent-type" is not present in json data during post request. This causes an exception post allocation of uuid in zookeeper.
This leak of uuid(zookeeper nodE) causes 409 error on subsequent creation of physical interface with that name.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 497, in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/gen/vnc_api_server_gen.py", line 10563, in physical_interfaces_http_post
    (ok, result) = db_conn.dbe_alloc('physical-interface', obj_dict, uuid_requested)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py", line 1436, in dbe_alloc
    (ok, result) = method(parent_type, obj_dict['fq_name'])
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/gen/vnc_ifmap_client_gen.py", line 6777, in _ifmap_physical_interface_alloc
    imid.physical_interface_alloc_ifmap_id(parent_type, fq_name)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/gen/vnc_ifmap_client_gen.py", line 15895, in physical_interface_alloc_ifmap_id
    parent_imid = 'contrail:' + parent_type + ':' + parent_fqn
TypeError: cannot concatenate 'str' and 'NoneType' objects

Changed in juniperopenstack:
assignee: nobody → Prakash Bailkeri (prakashmb)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : master

Review in progress for https://review.opencontrail.org/8441
Submitter: Prakash Bailkeri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8441
Committed: http://github.org/Juniper/contrail-generateDS/commit/d5835439f8383352a77b5bf9b1319eb503177b60
Submitter: Zuul
Branch: master

commit d5835439f8383352a77b5bf9b1319eb503177b60
Author: Prakash Bailkeri <email address hidden>
Date: Wed Mar 18 05:58:58 2015 -0700

Clean up fq_name_to_id mapping if parent_type is missing in obj_dict

If the parent_type field is missing in the JSON body if POST request, an exception
is raised while access it. This exception occurs after the uuid is allocated in zookeeper
Since the exception is not cause, the dbe_release is not called to release the fq_name_to_id
binding

Fix return error from ifmap_<type>_alloc function if parent type is required and missing in the POST request

Change-Id: Ia9fee6b7bb8d7a3641cdccaae4ecf8fe73235c70
Closes-Bug: 1433498

Changed in juniperopenstack:
status: New → Fix Committed
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : R2.1

Review in progress for https://review.opencontrail.org/8475
Submitter: Prakash Bailkeri (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/8475
Committed: http://github.org/Juniper/contrail-generateDS/commit/e375dc1c6d628ab430f94547bd71349d1e8bdeed
Submitter: Zuul
Branch: R2.1

commit e375dc1c6d628ab430f94547bd71349d1e8bdeed
Author: Prakash Bailkeri <email address hidden>
Date: Wed Mar 18 05:58:58 2015 -0700

Clean up fq_name_to_id mapping if parent_type is missing in obj_dict

If the parent_type field is missing in the JSON body if POST request, an exception
is raised while access it. This exception occurs after the uuid is allocated in zookeeper
Since the exception is not cause, the dbe_release is not called to release the fq_name_to_id
binding

Fix return error from ifmap_<type>_alloc function if parent type is required and missing in the POST request

Change-Id: Ia9fee6b7bb8d7a3641cdccaae4ecf8fe73235c70
Closes-Bug: 1433498

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.