Comment 27 for bug 1714004

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

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

commit 9618d9abe3672479ed45c9bd8b5ecf14e11908e4
Author: sbalineni <email address hidden>
Date: Wed Jan 24 11:08:07 2018 -0800

[DM]: Handle gracefully when two successive BGP unlink/delete PR and create PR happens

Problem:

T0: DM receives delete "bgp router" link removal request. As a result of this, DM tries to delete config from device in a separate Device Greenlet. Thi

T1: Immediately, DM receives another request “physical-router” delete, in the context of PR object delete, DM deletes the config from device (this happ

T2: Device Greenlet fails to delete config from Device (since config was already deleted (T1)), and hence goes into “RETRY” mode.

T3: DM receives new PR create/BGP router update events. ==> New PR Object gets created locally, and this will create a new Device Greenlet and ultimate

T4: When timer expires, Old Device Greenlet retries to delete the config, and this time delete will be successful. Config will be gone from Device.

Solution:
Terminate Pending Device Greenlet in the context of PR delete

Closes-Bug: #1714004

Conflicts:
 src/config/device-manager/test/test_case.py

Change-Id: Id6a35f4141aff0766194c64991ab6011d92ae88b