loadbalancer agent fails with KeyError: 'opencontrail'

Bug #1768413 reported by Vinoth Kannan Ganapathy on 2018-05-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R5.0
Fix Released
Critical
Yuvaraja Mariappan
Trunk
Fix Released
High
Yuvaraja Mariappan

Bug Description

contrail-version :5.0 build 44

creating loadbalancer fails to launch service instance.. seeing the following traceback error in the service monitor log

(keystone)[root@nodem14 /]# neutron lbaas-loadbalancer-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+----------------------+----------------------------------+--------------+---------------------+--------------+
| id | name | tenant_id | vip_address | provisioning_status | provider |
+--------------------------------------+----------------------+----------------------------------+--------------+---------------------+--------------+
| 865f71a1-f145-41b5-9339-5cad6bb2f8d1 | ctest-myvip-95731504 | 9878e05052994e3289769c14d27b83ea | 158.84.170.6 | ACTIVE | opencontrail |
+--------------------------------------+----------------------+----------------------------------+--------------+---------------------+--------------+
(keystone)[root@nodem14 /]#

self = <svc_monitor.config_db.LoadbalancerPoolSM object>
self._manager = <svc_monitor.svc_monitor.SvcMonitor object>
self._manager.loadbalancer_agent = <svc_monitor.loadbalancer_agent.LoadbalancerAgent object>
self._manager.loadbalancer_agent.loadbalancer_pool_add = <bound method LoadbalancerAgent.loadbalancer_poo...tor.loadbalancer_agent.LoadbalancerAgent object>>

 /usr/lib/python2.7/site-packages/svc_monitor/loadbalancer_agent.py in loadbalancer_pool_add(self=<svc_monitor.loadbalancer_agent.LoadbalancerAgent object>, pool=<svc_monitor.config_db.LoadbalancerPoolSM object>)
  236 def loadbalancer_pool_add(self, pool):
  237 p = self.loadbalancer_pool_get_reqdict(pool)
  238 driver = self._get_driver_for_pool(p['id'], p['provider'])
  239 try:
  240 if not pool.last_sent:
driver undefined
self = <svc_monitor.loadbalancer_agent.LoadbalancerAgent object>
self._get_driver_for_pool = <bound method LoadbalancerAgent._get_driver_for_...tor.loadbalancer_agent.LoadbalancerAgent object>>
p = {'admin_state_up': True, 'description': u'', 'health_monitors': ['0797225e-bdf4-4ef0-8bd3-d31b411e00d4'], 'health_monitors_status': [], 'id': u'9dd7ef00-baa2-4457-8b0a-56a7a68e1bc8', 'lb_method': 'ROUND_ROBIN', 'loadbalancer_id': '865f71a1-f145-41b5-9339-5cad6bb2f8d1', 'loadbalancer_version': 'v2', 'members': ['e6df80ab-7a93-46ec-b28f-57a8a2ac1cae', '1f6825ff-6124-4e8f-8647-aec381738a4b'], 'name': 'ctest-mypool-47634738', ...}

 /usr/lib/python2.7/site-packages/svc_monitor/loadbalancer_agent.py in _get_driver_for_pool(self=<svc_monitor.loadbalancer_agent.LoadbalancerAgent object>, pool_id=u'9dd7ef00-baa2-4457-8b0a-56a7a68e1bc8', provider='opencontrail')
  200 provider = pool.provider
  201 if provider:
  202 driver = self._get_driver_for_provider(provider)
  203 self._pool_driver[pool_id] = driver
  204 return driver
driver undefined
self = <svc_monitor.loadbalancer_agent.LoadbalancerAgent object>
self._get_driver_for_provider = <bound method LoadbalancerAgent._get_driver_for_...tor.loadbalancer_agent.LoadbalancerAgent object>>
provider = 'opencontrail'

 /usr/lib/python2.7/site-packages/svc_monitor/loadbalancer_agent.py in _get_driver_for_provider(self=<svc_monitor.loadbalancer_agent.LoadbalancerAgent object>, provider_name='opencontrail')
  190
  191 def _get_driver_for_provider(self, provider_name):
  192 return self._loadbalancer_driver[provider_name]
  193 # end _get_driver_for_provider
  194
self = <svc_monitor.loadbalancer_agent.LoadbalancerAgent object>
self._loadbalancer_driver = {'native': <svc_monitor.services.loadbalancer.drivers.native.driver.OpencontrailLoadbalancerDriver object>}
provider_name = 'opencontrail'
<type 'exceptions.KeyError'>: 'opencontrail'
    __class__ = <type 'exceptions.KeyError'>
    __delattr__ = <method-wrapper '__delattr__' of exceptions.KeyError object>
    __dict__ = {}
    __doc__ = 'Mapping key not found.'
    __format__ = <built-in method __format__ of exceptions.KeyError object>
    __getattribute__ = <method-wrapper '__getattribute__' of exceptions.KeyError object>
    __getitem__ = <method-wrapper '__getitem__' of exceptions.KeyError object>
    __getslice__ = <method-wrapper '__getslice__' of exceptions.KeyError object>
    __hash__ = <method-wrapper '__hash__' of exceptions.KeyError object>
    __init__ = <method-wrapper '__init__' of exceptions.KeyError object>
    __new__ = <built-in method __new__ of type object>
    __reduce__ = <built-in method __reduce__ of exceptions.KeyError object>
    __reduce_ex__ = <built-in method __reduce_ex__ of exceptions.KeyError object>
    __repr__ = <method-wrapper '__repr__' of exceptions.KeyError object>
    __setattr__ = <method-wrapper '__setattr__' of exceptions.KeyError object>
    __setstate__ = <built-in method __setstate__ of exceptions.KeyError object>
    __sizeof__ = <built-in method __sizeof__ of exceptions.KeyError object>
    __str__ = <method-wrapper '__str__' of exceptions.KeyError object>
    __subclasshook__ = <built-in method __subclasshook__ of type object>
    __unicode__ = <built-in method __unicode__ of exceptions.KeyError object>
    args = ('opencontrail',)
    message = 'opencontrail'

The above is a description of an error in a Python program. Here is
the original traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cfgm_common/vnc_amqp.py", line 65, in _vnc_subscribe_callback
    self.vnc_subscribe_actions()
  File "/usr/lib/python2.7/site-packages/cfgm_common/vnc_amqp.py", line 129, in vnc_subscribe_actions
    self.evaluate_dependency()
  File "/usr/lib/python2.7/site-packages/cfgm_common/vnc_amqp.py", line 235, in evaluate_dependency
    res_obj.evaluate()
  File "/usr/lib/python2.7/site-packages/svc_monitor/config_db.py", line 227, in evaluate
    self.add()
  File "/usr/lib/python2.7/site-packages/svc_monitor/config_db.py", line 197, in add
    self._manager.loadbalancer_agent.loadbalancer_pool_add(self)
  File "/usr/lib/python2.7/site-packages/svc_monitor/loadbalancer_agent.py", line 238, in loadbalancer_pool_add
    driver = self._get_driver_for_pool(p['id'], p['provider'])
  File "/usr/lib/python2.7/site-packages/svc_monitor/loadbalancer_agent.py", line 202, in _get_driver_for_pool
    driver = self._get_driver_for_provider(provider)
  File "/usr/lib/python2.7/site-packages/svc_monitor/loadbalancer_agent.py", line 192, in _get_driver_for_provider
    return self._loadbalancer_driver[provider_name]
KeyError: 'opencontrail'

tags: added: sanityblocker
information type: Proprietary → Public

not seen with the latest sanity.

tags: removed: sanityblocker
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers