This repository has been archived by the owner on Feb 14, 2024. It is now read-only.
fix(module/vmseries): fix destroy sequence for LB backends #246
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For destroy operations, force the LB backend association to be destroyed 1st.
Motivation and Context
W/o that manual dependency, during destroy operations, a race condition can happen, when VM is being destroyed before the NIC - LB backend association. In such case the destroy operation fails with an error. The problem is not the order but the fact that the VM is in a 'destroying' phase while the the destroy operation is run on the association.
This fix can also close #199 as the problem described in that issue is triggered only when a destroy operation 1st fails due to the described race condition.
How Has This Been Tested?
Existing code/example have been run to prove that the race condition cannot be reproduced.
Screenshots (if appropriate)
Types of changes
Checklist