snmp-collector failed due to undefined exception e

Bug #1532432 reported by Vedamurthy Joshi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
ted ghose
R3.0
Fix Committed
High
ted ghose
Trunk
Fix Committed
High
ted ghose

Bug Description

R2.22 Build 116 Ubuntu 14.04 Juno multi node

Looks like an indentation issue...

12/28/2015 11:31:23 AM [contrail-snmp-collector]: SANDESH: CONNECT TO COLLECTOR: True
12/28/2015 11:31:23 AM [contrail-snmp-collector]: SANDESH: Logging: LEVEL: [SYS_INFO] -> [SYS_NOTICE]
Traceback (most recent call last):
  File "/usr/bin/contrail-snmp-collector", line 9, in <module>
    load_entry_point('contrail-snmp-collector==0.2.0', 'console_scripts', 'contrail-snmp-collector')()
  File "/usr/lib/python2.7/dist-packages/contrail_snmp_collector/main.py", line 18, in emain
    controller.run()
  File "/usr/lib/python2.7/dist-packages/contrail_snmp_collector/snmpctrlr.py", line 264, in run
    if constnt_schdlr.schedule(self._config.devices()):
  File "/usr/lib/python2.7/dist-packages/contrail_snmp_collector/snmpcfg.py", line 203, in devices
    self._args.auth_protocol, self._cb)
  File "/usr/lib/python2.7/dist-packages/contrail_snmp_collector/device_config.py", line 110, in fom_api_server
    auth_protocol=auth_protocol, notifycb=notifycb)
  File "/usr/lib/python2.7/dist-packages/contrail_snmp_collector/device_config.py", line 101, in get_vnc
    raise e
UnboundLocalError: local variable 'e' referenced before assignment
root@anushka-vm:/var/log/contrail#

-------------

/usr/lib/python2.7/dist-packages/contrail_snmp_collector/device_config.py

 78 @staticmethod
 79 def get_vnc(usr, passwd, tenant, api_servers, auth_host=None,
 80 auth_port=None, auth_protocol=None, notifycb=None):
 81 for rt in (5, 2, 7, 9, 16, 25):
 82 for api_server in api_servers:
 83 srv = api_server.split(':')
 84 if len(srv) == 2:
 85 ip, port = srv[0], int(srv[1])
 86 else:
 87 ip, port = '127.0.0.1', int(srv[0])
 88 try:
 89 vnc = VncApi(usr, passwd, tenant, ip, port,
 90 auth_host=auth_host, auth_port=auth_port,
 91 auth_protocol=auth_protocol)
 92 if callable(notifycb):
 93 notifycb('api', 'Connected', servers=api_server)
 94 return vnc
 95 except Exception as e:
 96 traceback.print_exc()
 97 if callable(notifycb):
 98 notifycb('api', 'Not connected', servers=api_server,
 99 up=False)
100 time.sleep(rt)
101 raise e

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

Review in progress for https://review.opencontrail.org/17288
Submitter: ted ghose (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/17294
Submitter: ted ghose (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/17288
Committed: http://github.org/Juniper/contrail-controller/commit/2fad060a6b79463ddc243008d59c6e7a9f45c339
Submitter: Zuul
Branch: master

commit 2fad060a6b79463ddc243008d59c6e7a9f45c339
Author: Ted Ghose <email address hidden>
Date: Tue Feb 16 09:49:35 2016 -0800

snmp-collector failed due to undefined exception e

the variable e is not initialized

Change-Id: I497572c063641ac1e7b44a19d8a188f5a945eff9
Closes-Bug: 1532432

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

Reviewed: https://review.opencontrail.org/17294
Committed: http://github.org/Juniper/contrail-controller/commit/389ed2b05e47c9c18664a92bd79e6c5f3aff0922
Submitter: Zuul
Branch: R2.20

commit 389ed2b05e47c9c18664a92bd79e6c5f3aff0922
Author: Ted Ghose <email address hidden>
Date: Tue Feb 16 09:49:35 2016 -0800

snmp-collector failed due to undefined exception e

the variable e is not initialized

Change-Id: Iee2462aab1e8bf3385ea87dc760e842689c43a89
Closes-Bug: 1532432

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

Review in progress for https://review.opencontrail.org/17392
Submitter: ted ghose (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/17392
Committed: http://github.org/Juniper/contrail-controller/commit/6dfbdf5027d7d75f7259d2b6be83e8eba7ec931d
Submitter: Zuul
Branch: R3.0

commit 6dfbdf5027d7d75f7259d2b6be83e8eba7ec931d
Author: Ted Ghose <email address hidden>
Date: Tue Feb 16 09:49:35 2016 -0800

snmp-collector failed due to undefined exception e

the variable e is not initialized

Change-Id: I469ea6d696e5d2efef83e35b09a47200acc88eb8
Closes-Bug: 1532432

Revision history for this message
Jim Reilly (jpreilly) wrote :

Sriram,

contrail-snmp-collector and contrail-topology are needed only for the underlay-overlay feature and it was beta in R2.22
So, we don’t intend to back port any fix related to snmp-collector and topology in R2.22

Thanks,
Sundar

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.