vcenter-only: create VN failing with exception

Bug #1635728 reported by Sarath
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
Critical
Hampapur Ajay
Trunk
Fix Committed
Critical
Hampapur Ajay

Bug Description

create VN failing with exception API server on mainline#2746

Ajay debugged and know the problem

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 578, in http_resource_create
    ok, result = stateful_create()
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 519, in stateful_create
    db_conn)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_types.py", line 1078, in pre_dbe_create
    vn_uuid)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_types.py", line 985, in _check_ipam_network_subnets
    obj_ids={'uuid': ipam_uuid})
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py", line 1929, in dbe_read
    ret_readonly=ret_readonly)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/vnc_cassandra.py", line 753, in object_read
    timestamp=True)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/vnc_cassandra.py", line 183, in multiget
    column_count=self._MAX_COL)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/vnc_cassandra.py", line 451, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pycassa/columnfamily.py", line 761, in multiget
    packed_keys = map(self._pack_key, keys)
  File "/usr/lib/python2.7/dist-packages/pycassa/columnfamily.py", line 488, in _pack_key
    return self._key_packer(key)
  File "/usr/lib/python2.7/dist-packages/pycassa/marshal.py", line 319, in pack_bytes
    % (v.__class__.__name__, str(v)))
TypeError: A str or unicode value was expected, but NoneType was received instead (None)

Revision history for this message
Hampapur Ajay (hajay) wrote :
Download full text (8.6 KiB)

Details from log file with cgitb detailed info

[2016-10-21 06:05:02,038] [INFO ] [Thread-3:ApiConnectorImpl@228][] [>> Request: POST, /virtual-networks, {"virtual-network":{"router_external":false,"is_shared":false,"external_ipam":true,"flood_unknown_unicast":false,"multi_policy_service_chains_enabled":false,"id_perms":{"enable":true,"user_visible":false,"creator":"vcenter-plugin"},"display_name":"ctest-vn-58650667","network_ipam_refs":[{"to":["default-domain","vCenter","vCenter-ipam"],"attr":{"ipam_subnets":[{"subnet":{"ip_prefix":"12.11.10.0","ip_prefix_len":24},"subnet_uuid":"f704a3ba-0217-48e8-b0ab-804cb3611548","enable_dhcp":true,"addr_from_start":true,"subnet_name":"ctest-vn-58650667-subnet","alloc_unit":1}]},"href":null,"uuid":null}],"name":"ctest-vn-58650667","uuid":"1d7baeea-861c-313f-a132-0b23a474d189","fq_name":["default-domain","vCenter","ctest-vn-58650667"],"parent_type":"project"}}]
[2016-10-21 06:05:02,083] [INFO ] [Thread-3:ApiConnectorImpl@263][] [<< Response Status: HTTP/1.1 500 Internal Server Error]
[2016-10-21 06:05:02,084] [ERROR] [Thread-3:ApiConnectorImpl@354][] [create api request failed: Internal Server Error]
[2016-10-21 06:05:02,084] [ERROR] [Thread-3:ApiConnectorImpl@356][] [Failure message: <type 'exceptions.TypeError'>
Python 2.7.6: /usr/bin/python
Fri Oct 21 06:05:02 2016

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py in http_resource_create(self=<vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>, obj_type='virtual_network')
  576
  577 try:
  578 ok, result = stateful_create()
  579 except Exception as e:
  580 ok = False
ok = False
result = u'1d7baeea-861c-313f-a132-0b23a474d189'
stateful_create = <function stateful_create>

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py in stateful_create()
  517 # type-specific hook
  518 (ok, result) = r_class.pre_dbe_create(tenant_name, obj_dict,
  519 db_conn)
  520 if not ok:
  521 return (ok, result)
db_conn = <vnc_cfg_api_server.vnc_cfg_ifmap.VncDbClient object>

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_types.py in pre_dbe_create(cls=<class 'vnc_cfg_api_server.vnc_cfg_types.VirtualNetworkServer'>, tenant_name='default-project', obj_dict={u'display_name': u'ctest-vn-58650667', u'external_ipam': True, u'flood_unknown_unicast': False, u'fq_name': [u'default-domain', u'vCenter', u'ctest-vn-58650667'], u'id_perms': {u'created': None, u'creator': u'vcenter-plugin', u'description': None, u'enable': True, u'last_modified': None, u'permissions': {u'group': u'cloud-admin-group', u'group_access': 7, u'other_access': 7, u'owner': u'cloud-admin', u'owner_access': 7}, u'user_visible': False, u'uuid': {'uuid_lslong': 11615358636652810633L, 'uuid_mslong': 2124483971530895679L}}, u'is_shared': False, u'multi_policy_service_chains_enabled': False, u'name': u'ctest-vn-58650667', u'network_ipam_refs': [{u'attr': {u'ipam_subnets': [{...

Read more...

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/25147
Submitter: Hampapur Ajay (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/25234
Submitter: Hampapur Ajay (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/25147
Committed: http://github.org/Juniper/contrail-controller/commit/77477d309c41cba6a7f56a94874bdb4a81322f54
Submitter: Zuul
Branch: master

commit 77477d309c41cba6a7f56a94874bdb4a81322f54
Author: Hampapur Ajay <email address hidden>
Date: Fri Oct 21 15:11:59 2016 -0700

Convert fq-name-to-uuid in case of 'uuid' key specified but None.

Change-Id: Id61624c0a8617d5e3522dc38cf37650d5c046b99
Closes-Bug: 1635728
(cherry picked from commit db27cd07d560d106ccb91f43ac8e5bc5f79c8ce8)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/25234
Committed: http://github.org/Juniper/contrail-controller/commit/68c8d105629c0a566dc05e07dc7af4a843317a5d
Submitter: Zuul
Branch: R3.2

commit 68c8d105629c0a566dc05e07dc7af4a843317a5d
Author: Hampapur Ajay <email address hidden>
Date: Fri Oct 21 15:11:59 2016 -0700

Convert fq-name-to-uuid in case of 'uuid' key specified but None.

Change-Id: Id61624c0a8617d5e3522dc38cf37650d5c046b99
Closes-Bug: 1635728
(cherry picked from commit db27cd07d560d106ccb91f43ac8e5bc5f79c8ce8)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/26668
Submitter: Hampapur Ajay (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/26668
Committed: http://github.org/Juniper/contrail-controller/commit/20d4282aea62f4742bb175eec07506fd0a9b58d4
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 20d4282aea62f4742bb175eec07506fd0a9b58d4
Author: Hampapur Ajay <email address hidden>
Date: Tue Nov 29 10:33:10 2016 -0800

If 'uuid' key specified but None, do lookup from fq-name to uuid

Change-Id: Iaf9543611d9241d37cb4d7c85530f049af1dd0d7
Closes-Bug: 1635728
(cherry picked from commit be9c3bd96083bc50e983b113a6f398e059852630)

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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