[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/39406 github. com/Juniper/ contrail- controller/ commit/ 9618d9abe367247 9ed45c9bd8b5ecf 14e11908e4
Committed: http://
Submitter: Zuul (<email address hidden>)
Branch: R4.1
commit 9618d9abe367247 9ed45c9bd8b5ecf 14e11908e4
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: device- manager/ test/test_ case.py
src/config/
Change-Id: Id6a35f4141aff0 766194c64991ab6 011d92ae88b