Handle reception of non-ascii characters in sandesh message in contrail-alarm-gen

Bug #1646696 reported by Raj Reddy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0.3.x
Fix Committed
Undecided
Anish Mehta
R3.1
Fix Committed
High
Anish Mehta
R3.2
Fix Committed
Undecided
Anish Mehta
Trunk
Fix Committed
High
Anish Mehta

Bug Description

when non-ascii chars are received, alarm-gen throws exception and restarts the process, we need to handle it more gracefully by catching the exception and ignoring such messages. The appropriate diff should be

rajreddy@ubuntu-build04:/github-build/R3.0/51/ubuntu-14-04/kilo/store/sandbox$ diff controller/src/opserver/uveserver.py ~/uveserver.py
323c323,328
< snhdict = xmltodict.parse(value)
---
> try:
> snhdict = xmltodict.parse(value)
> except:
> self._logger.error("failed to parse %s" % (str(value)))
> continue
>

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

Review in progress for https://review.opencontrail.org/26727
Submitter: Anish Mehta (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/26728
Submitter: Anish Mehta (<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/26729
Submitter: Anish Mehta (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/26730
Submitter: Anish Mehta (<email address hidden>)

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

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

commit 0e23c582a567b7d0da0bd6f195c8030deed05a92
Author: Anish Mehta <email address hidden>
Date: Fri Dec 2 10:56:39 2016 -0800

We need to handle XML parsing errors in UVE aggregation.
Any attributes that cannot be parsed will be ignored.
Closes-Bug:1646696

Change-Id: I1fdb07475a6f312ed9e30782ffaa44a4dd3141f4

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

Reviewed: https://review.opencontrail.org/26730
Committed: http://github.org/Juniper/contrail-controller/commit/3eb017ec1df6ed1aeece94ff66b08bf4fcac5b17
Submitter: Zuul (<email address hidden>)
Branch: master

commit 3eb017ec1df6ed1aeece94ff66b08bf4fcac5b17
Author: Anish Mehta <email address hidden>
Date: Fri Dec 2 10:56:39 2016 -0800

We need to handle XML parsing errors in UVE aggregation.
Any attributes that cannot be parsed will be ignored.
Closes-Bug:1646696

Change-Id: I1fdb07475a6f312ed9e30782ffaa44a4dd3141f4

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

Reviewed: https://review.opencontrail.org/26728
Committed: http://github.org/Juniper/contrail-controller/commit/23ccb63397d8719937a480fa4fe0742d73c786f0
Submitter: Zuul (<email address hidden>)
Branch: R3.0.3.x

commit 23ccb63397d8719937a480fa4fe0742d73c786f0
Author: Anish Mehta <email address hidden>
Date: Fri Dec 2 10:56:39 2016 -0800

We need to handle XML parsing errors in UVE aggregation.
Any attributes that cannot be parsed will be ignored.
Closes-Bug:1646696

Change-Id: I1fdb07475a6f312ed9e30782ffaa44a4dd3141f4

Conflicts:
 src/opserver/uveserver.py
Change-Id: I1fdb07475a6f312ed9e30782ffaa44a4dd3141f4

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

Review in progress for https://review.opencontrail.org/26727
Submitter: Anish Mehta (<email address hidden>)

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

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

commit 0d3cfae105b78e0b0f514acce3ef5010ff8e6971
Author: Anish Mehta <email address hidden>
Date: Fri Dec 2 10:56:39 2016 -0800

We need to handle XML parsing errors in UVE aggregation.
Any attributes that cannot be parsed will be ignored.
Closes-Bug:1646696

Change-Id: I1fdb07475a6f312ed9e30782ffaa44a4dd3141f4

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.