Internal python vnc_ifmap can't handle white spaces in openstack project name.
Impact: no object can be deleted from ifmap in such projects.
For example, if we have project with name "Test project with spaces", we would get the following on object deletion:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_db.py", line 331, in _dbe_subscribe_callback
self._dbe_delete_notification(oper_info)
File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_db.py", line 440, in _dbe_delete_notification
(ok, ifmap_result) = self._ifmap_db.object_delete(obj_info)
File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_ifmap.py", line 724, in object_delete
VncIfmapServer.delete(obj_ids['imid'])
File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_ifmap.py", line 335, in delete
cls.delete(id_name, cls.get_links(id_name).keys())
File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_ifmap.py", line 321, in delete
if not cls._graph[other_name]['links']:
KeyError: 'contrail:virtual-machine-interface:default-domain:Test'
Affected code is in vnc_ifmap.py in delete() function: other_name = link_key.split()[1] <...> if not cls._graph[other_name]['links']: del cls._graph[other_name]
In our case link_key.split()[1] will get just a part of full object name before the first space, and hence an attempt to access it in _graph will fail with KeyError.
Internal python vnc_ifmap can't handle white spaces in openstack project name.
Impact: no object can be deleted from ifmap in such projects.
For example, if we have project with name "Test project with spaces", we would get the following on object deletion:
Traceback (most recent call last): python2. 7/dist- packages/ vnc_cfg_ api_server/ vnc_db. py", line 331, in _dbe_subscribe_ callback delete_ notification( oper_info) python2. 7/dist- packages/ vnc_cfg_ api_server/ vnc_db. py", line 440, in _dbe_delete_ notification db.object_ delete( obj_info) python2. 7/dist- packages/ vnc_cfg_ api_server/ vnc_ifmap. py", line 724, in object_delete delete( obj_ids[ 'imid'] ) python2. 7/dist- packages/ vnc_cfg_ api_server/ vnc_ifmap. py", line 335, in delete links(id_ name).keys( )) python2. 7/dist- packages/ vnc_cfg_ api_server/ vnc_ifmap. py", line 321, in delete other_name] ['links' ]: virtual- machine- interface: default- domain: Test'
File "/usr/lib/
self._dbe_
File "/usr/lib/
(ok, ifmap_result) = self._ifmap_
File "/usr/lib/
VncIfmapServer.
File "/usr/lib/
cls.delete(id_name, cls.get_
File "/usr/lib/
if not cls._graph[
KeyError: 'contrail:
Affected code is in vnc_ifmap.py in delete() function:
other_ name = link_key.split()[1]
< ...>
if not cls._graph[ other_name] ['links' ]:
del cls._graph[ other_name]
In our case link_key.split()[1] will get just a part of full object name before the first space, and hence an attempt to access it in _graph will fail with KeyError.