[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
Reviewed: https:/ /review. opencontrail. org/39196 github. com/Juniper/ contrail- controller/ commit/ 33898462f2dc140 38dc07945616fd3 cec27c038e
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: R4.0
commit 33898462f2dc140 38dc07945616fd3 cec27c038e
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
Change-Id: I68a96577716984 1197973133c68b0 a08b25570f8
Closes-Bug: #1714004