contrail-svc-monitor: TypeError: cannot concatenate 'str' and 'NoneType' objects

Bug #1549755 reported by Martin Millnert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
Martin Millnert
Trunk
Fix Committed
High
Martin Millnert

Bug Description

The past <36 hours, a change introduced to master causes a latent bug to be exposed in contrail-svc-monitor's svc_monitor/snat_agent.py -- see attachment for stacktrace.

The only change in contrail-svc-monitor in this time frame seems to be:
https://github.com/Juniper/contrail-controller/commit/84e6526e78f4f6a50fcc8cb11d33cc8ffd2d9f19

We could work around the problem by downgrading to the contrail-config-3.1.0.0-1602240147.el7.noarch package built from trunk 2016-02-24 3am UTC.
So it is definitely a bug introduced or latent bug revealed after that.

Revision history for this message
Martin Millnert (r-martin-5) wrote :
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/17810
Submitter: Martin Millnert (<email address hidden>)

tags: added: config server-manager
tags: added: service-chain
removed: server-manager
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/17856
Submitter: Rudra Rugge (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/17810
Committed: http://github.org/Juniper/contrail-controller/commit/682832be701f1c19ec68b7fcb406c67fc525ad4a
Submitter: Zuul
Branch: master

commit 682832be701f1c19ec68b7fcb406c67fc525ad4a
Author: Martin Millnert <email address hidden>
Date: Thu Feb 25 12:32:41 2016 +0100

svc-monitor: Avoid NoneType Error in snat_agent.py

The method cleanup_snat_instance in svc_monitor/snat_agent.py
can be called with lr_id == None from audit_snat_instances.

If that happens, the Python interpreter crashes since line 282
performs a string concatenation of 'rt_' and None, which does not work.

The proper thing to do in cleanup_snat_instance, when lr_id == None,
seems to be to set rt_obj = None.

Why this state has appeared, if errornous, which I do not know, is IMO
secondary to the code being executable by the interpreter.

Change-Id: I2cf31f956d8992354cc1635c04bc3c807f1db38a
Signed-off-by: Martin Millnert <email address hidden>
Closes-Bug: #1549755

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

Reviewed: https://review.opencontrail.org/17856
Committed: http://github.org/Juniper/contrail-controller/commit/9ddfbf0f5347315f220eb4949d1ba4a3fd9abd38
Submitter: Zuul
Branch: R3.0

commit 9ddfbf0f5347315f220eb4949d1ba4a3fd9abd38
Author: Martin Millnert <email address hidden>
Date: Thu Feb 25 12:32:41 2016 +0100

svc-monitor: Avoid NoneType Error in snat_agent.py

The method cleanup_snat_instance in svc_monitor/snat_agent.py
can be called with lr_id == None from audit_snat_instances.

If that happens, the Python interpreter crashes since line 282
performs a string concatenation of 'rt_' and None, which does not work.

The proper thing to do in cleanup_snat_instance, when lr_id == None,
seems to be to set rt_obj = None.

Why this state has appeared, if errornous, which I do not know, is IMO
secondary to the code being executable by the interpreter.

Change-Id: I2cf31f956d8992354cc1635c04bc3c807f1db38a
Signed-off-by: Martin Millnert <email address hidden>
Closes-Bug: #1549755
Closes-Bug: #1549637

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.