Skip to content

Commit

Permalink
fix for service monitor sync issues with snat
Browse files Browse the repository at this point in the history
when the snat DB is corrupted, service monitor throws
an exception and fails to sync with other snat services.

Added validity code to check the object before it is used

Change-Id: Ia512768f9d5749428256e56b5f472a4bf7cd260c
Closes-bug: 1617043
  • Loading branch information
ymariappan committed Aug 26, 2016
1 parent 4ee54b2 commit 4be8f68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/svc-monitor/svc_monitor/snat_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def audit_snat_instances(self):
for si in ServiceInstanceSM.values():
si_name = si.fq_name[-1]
st_obj = ServiceTemplateSM.get(si.service_template)
if st_obj.params['service_type'] != "source-nat":
if st_obj == None or st_obj.params['service_type'] != "source-nat":
continue
lr_uuid = si.logical_router
lr = LogicalRouterSM.get(lr_uuid)
Expand Down

0 comments on commit 4be8f68

Please sign in to comment.