[Config]: Few config services fail to come up as exception not handled correctly

Bug #1777406 reported by Pulkit Tandon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Released
Medium
Yuvaraja Mariappan
R4.0
Fix Released
Medium
Yuvaraja Mariappan
R4.1
Fix Released
Medium
Yuvaraja Mariappan
R5.0
Fix Released
Medium
Yuvaraja Mariappan
Trunk
Fix Released
Medium
Yuvaraja Mariappan

Bug Description

R5.0-101

Due to some error, few config services try to raise an exception which is not defined.
This need to be handled properly.

But few other config services have also failed due to following error:
Traceback (most recent call last):
  File "/usr/bin/contrail-svc-monitor", line 9, in <module>
    load_entry_point('svc-monitor==0.1dev', 'console_scripts', 'contrail-svc-monitor')()
  File "/usr/lib/python2.7/site-packages/svc_monitor/svc_monitor.py", line 953, in server_main
    main()
  File "/usr/lib/python2.7/site-packages/svc_monitor/svc_monitor.py", line 947, in main
    run_svc_monitor, sm_logger, args)
  File "/usr/lib/python2.7/site-packages/cfgm_common/zkclient.py", line 505, in master_election
    self._election.run(func, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/kazoo/recipe/election.py", line 53, in run
    func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/svc_monitor/svc_monitor.py", line 897, in run_svc_monitor
    except (RuntimeError, ResourceExhaustionError):
NameError: global name 'ResourceExhaustionError' is not defined

== Contrail config ==
api: active
zookeeper: active
svc-monitor: inactive
nodemgr: initializing
device-manager: inactive
cassandra: active
rabbitmq: active
schema: inactive

Revision history for this message
Pulkit Tandon (pulkitt) wrote :

Hi Pulkit,

I have raised the review(https://review.opencontrail.org/#/c/43903/) for the bug https://bugs.launchpad.net/juniperopenstack/+bug/1777277.

With respect to the svc_monitor issue, I don’t see https://github.com/Juniper/contrail-controller/blob/R5.0/src/config/svc-monitor/svc_monitor/svc_monitor.py code
importing ResourceExhaustionError from cfgm_common.(day one issue)

This issue was masked till now as the code never hit line 897. Now due to the AttributeError: 'str' object has no attribute 'basename'
When instantiating VncApi at lint 887, this issue is exposed.

Please raise a separate bug for svc_monitor and work with sachin vaidya/Yuvaraj

Thanks,
Ignatious

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

Review in progress for https://review.opencontrail.org/44357
Submitter: Yuvaraja Mariappan

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

Review in progress for https://review.opencontrail.org/44358
Submitter: Yuvaraja Mariappan

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

Review in progress for https://review.opencontrail.org/44359
Submitter: Yuvaraja Mariappan

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

Review in progress for https://review.opencontrail.org/44360
Submitter: Yuvaraja Mariappan

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

Review in progress for https://review.opencontrail.org/44361
Submitter: Yuvaraja Mariappan

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

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

commit de0279cd3b3ad984e127020f83ad4c11ce37626e
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Jul 4 08:19:57 2018 -0700

Missing import for ResourceExhaustionError is added

Missing import for ResourceExhaustionError is added
Closes-bug: #1777406

Change-Id: I8e5dbc0dbd9fdc55dd211ff11142d93208a8b869

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

Reviewed: https://review.opencontrail.org/44357
Committed: http://github.com/Juniper/contrail-controller/commit/9e7ae097bba7c4f112ab2aea244cfdcb249c25f1
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R5.0

commit 9e7ae097bba7c4f112ab2aea244cfdcb249c25f1
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Jul 4 07:58:33 2018 -0700

Missing import for ResourceExhaustionError is added

Missing import for ResourceExhaustionError is added
Closes-bug: #1777406

Change-Id: I8e5dbc0dbd9fdc55dd211ff11142d93208a8b869

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

Reviewed: https://review.opencontrail.org/44358
Committed: http://github.com/Juniper/contrail-controller/commit/7fe3aacc655090dd1699dddd79203a6598cfd982
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 7fe3aacc655090dd1699dddd79203a6598cfd982
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Jul 4 07:58:33 2018 -0700

Missing import for ResourceExhaustionError is added

Missing import for ResourceExhaustionError is added
Closes-bug: #1777406

Change-Id: I8e5dbc0dbd9fdc55dd211ff11142d93208a8b869

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

Reviewed: https://review.opencontrail.org/44361
Committed: http://github.com/Juniper/contrail-controller/commit/0aa6150cb7ecb12f27e1caceed477aea9ad567a5
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit 0aa6150cb7ecb12f27e1caceed477aea9ad567a5
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Jul 4 08:19:57 2018 -0700

Missing import for ResourceExhaustionError is added

Missing import for ResourceExhaustionError is added
Closes-bug: #1777406

Change-Id: I8e5dbc0dbd9fdc55dd211ff11142d93208a8b869

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

Reviewed: https://review.opencontrail.org/44360
Committed: http://github.com/Juniper/contrail-controller/commit/fbbd5522ee52aa0c4a52815e61c53d23ea390ae6
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit fbbd5522ee52aa0c4a52815e61c53d23ea390ae6
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Jul 4 08:19:57 2018 -0700

Missing import for ResourceExhaustionError is added

Missing import for ResourceExhaustionError is added
Closes-bug: #1777406

Change-Id: I8e5dbc0dbd9fdc55dd211ff11142d93208a8b869

Revision history for this message
Pulkit Tandon (pulkitt) wrote :

Verified on R5.0 and master.
Issue not seen.

Closing on other branches as well as the fix is minor

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.