Comment 6 for bug 1453956

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

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

commit abdb26d0b61b759089b3572648394d16413e06ee
Author: Divakar <email address hidden>
Date: Wed May 27 20:59:31 2015 -0700

Clearing service instance DB State after STOP command

If Delete of service instance is received before it was marked
unusable, to stop the namespace, StopServiceInstance command is issued,
which invokes the deletion of the namespace script. And immediately after
this, DB state is cleared. Clearing of DB State can result in deleting
of service instance DBEntry before namespace script completion. SIGCHILD
event after script completion looks for service instance that triggered the
task, and results in crash as the service isntance is already deleted.
To avoid crash, the DBState is cleared after processing the SIGCHILD
event. Also corresponding to the service instance, there can be many
tasks queued for execution. To identify how any SIGCHILDS to wait for,
running tasks cound is maintained in DBState. This could is manipulated
everytime the task is created, destroyed, error handled corresponding to
the service instance.

Testcases to follow in the next commit

Change-Id: I4b9853de271b8ee54016bb91b7a2e199cbce6b0d
closes-bug: #1449166
closes-bug: #1453956