Race condition in VmSubscribe processing

Bug #1577463 reported by Nischal Sheth
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R2.20
Fix Committed
High
Tapan Karwa
R2.21.x
Fix Committed
High
Tapan Karwa
R2.22.x
Fix Committed
High
Tapan Karwa
R3.0
Fix Committed
High
Tapan Karwa
Trunk
Fix Committed
High
Tapan Karwa

Bug Description

If CN receives a VmSubscribe with a UUID when the IFMapNode for the VM in
question in marked deleted, the VmSubscribe is ignored. The VmSubscribe
request should ideally be treated as pending and processed when VM node is
resurrected.

Relevant code is in IFMapServer::IFMapVmSubscribe::Run.

Nischal Sheth (nsheth)
no longer affects: juniperopenstack/r3.0
description: updated
description: updated
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/20124
Submitter: Tapan Karwa (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/20128
Submitter: Tapan Karwa (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.21.x

Review in progress for https://review.opencontrail.org/20129
Submitter: Tapan Karwa (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22.x

Review in progress for https://review.opencontrail.org/20130
Submitter: Tapan Karwa (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/20131
Submitter: Tapan Karwa (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/20124
Committed: http://github.org/Juniper/contrail-controller/commit/c7572b0cbcf51e000f4c43ab16f4b792393601f7
Submitter: Zuul
Branch: master

commit c7572b0cbcf51e000f4c43ab16f4b792393601f7
Author: Tapan Karwa <email address hidden>
Date: Wed May 11 14:49:48 2016 -0700

Fix VmSubscribe race condition with deleted nodes.

If CN receives a VmSubscribe with a UUID when the IFMapNode for the VM in
question in marked deleted, the VmSubscribe is ignored. The VmSubscribe request
should not be ignored. Instead, it should be treated as pending and processed
when VM node is resurrected. If the node is truly deleted and wont ever get
revived, the agent should send a vm-unsubscribe since it sent a vm-subscribe.
That should cleanup the pending entry. If the agent dies before he sends a
vm-unsubscribe, client cleanup should also cleanup the pending entry.

Change-Id: Idb22d3a93b4df46e7ab2874edba358432f48de8f
Closes-Bug: #1577463

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/20130
Committed: http://github.org/Juniper/contrail-controller/commit/0876c5f804ebf3578dc6c28be1334dcebecffc0f
Submitter: Zuul
Branch: R2.22.x

commit 0876c5f804ebf3578dc6c28be1334dcebecffc0f
Author: Tapan Karwa <email address hidden>
Date: Wed May 11 14:49:48 2016 -0700

Fix VmSubscribe race condition with deleted nodes.

If CN receives a VmSubscribe with a UUID when the IFMapNode for the VM in
question in marked deleted, the VmSubscribe is ignored. The VmSubscribe request
should not be ignored. Instead, it should be treated as pending and processed
when VM node is resurrected. If the node is truly deleted and wont ever get
revived, the agent should send a vm-unsubscribe since it sent a vm-subscribe.
That should cleanup the pending entry. If the agent dies before he sends a
vm-unsubscribe, client cleanup should also cleanup the pending entry.

Change-Id: Idb22d3a93b4df46e7ab2874edba358432f48de8f
Closes-Bug: #1577463
(cherry picked from commit c7572b0cbcf51e000f4c43ab16f4b792393601f7)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/20129
Committed: http://github.org/Juniper/contrail-controller/commit/0ad792de1aad40baf5ff0e895ef5bac2c967c732
Submitter: Zuul
Branch: R2.21.x

commit 0ad792de1aad40baf5ff0e895ef5bac2c967c732
Author: Tapan Karwa <email address hidden>
Date: Wed May 11 14:49:48 2016 -0700

Fix VmSubscribe race condition with deleted nodes.

If CN receives a VmSubscribe with a UUID when the IFMapNode for the VM in
question in marked deleted, the VmSubscribe is ignored. The VmSubscribe request
should not be ignored. Instead, it should be treated as pending and processed
when VM node is resurrected. If the node is truly deleted and wont ever get
revived, the agent should send a vm-unsubscribe since it sent a vm-subscribe.
That should cleanup the pending entry. If the agent dies before he sends a
vm-unsubscribe, client cleanup should also cleanup the pending entry.

Change-Id: Idb22d3a93b4df46e7ab2874edba358432f48de8f
Closes-Bug: #1577463
(cherry picked from commit c7572b0cbcf51e000f4c43ab16f4b792393601f7)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

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

commit 9647407c91584efb1c3374e7aa0ae5f660d4b888
Author: Tapan Karwa <email address hidden>
Date: Wed May 11 14:49:48 2016 -0700

Fix VmSubscribe race condition with deleted nodes.

If CN receives a VmSubscribe with a UUID when the IFMapNode for the VM in
question in marked deleted, the VmSubscribe is ignored. The VmSubscribe request
should not be ignored. Instead, it should be treated as pending and processed
when VM node is resurrected. If the node is truly deleted and wont ever get
revived, the agent should send a vm-unsubscribe since it sent a vm-subscribe.
That should cleanup the pending entry. If the agent dies before he sends a
vm-unsubscribe, client cleanup should also cleanup the pending entry.

Change-Id: Idb22d3a93b4df46e7ab2874edba358432f48de8f
Closes-Bug: #1577463
(cherry picked from commit c7572b0cbcf51e000f4c43ab16f4b792393601f7)

Revision history for this message
Nischal Sheth (nsheth) wrote :

Note that fix went into 3.0 via https://review.opencontrail.org/#/c/20131/.
Bug activity log was somehow not automatically updated.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.