Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix aws dependency violation error #26

Merged
merged 6 commits into from
Sep 21, 2022

Conversation

shenmo3
Copy link
Contributor

@shenmo3 shenmo3 commented Sep 16, 2022

Description

This PR fixes the dependency violation error for AWS. When ANP rule and addressGroup changes, cloud controller attempts to delete previous addressGroup before checking if the associated security rule in appliedToGroup is deleted. This result in a dependency violation error returned by AWS. The deletion eventually succeed on retry after the security rule is removed. This PR adds such security rule association and checks before deleting addressGroup, putting it into a pending state. No user behavior is changed

Changes

  1. Add a map in appliedToSG to track its rule referenced addressGroups. Add an index for the reference.
  2. Block addressGroup delete if any reference exist.
  3. Fix some import and comment format.

Signed-off-by: Alexander Liu [email protected]

Signed-off-by: Alexander Liu <[email protected]>
@shenmo3 shenmo3 self-assigned this Sep 16, 2022
@shenmo3
Copy link
Contributor Author

shenmo3 commented Sep 16, 2022

/nephe-test-e2e-all

@shenmo3
Copy link
Contributor Author

shenmo3 commented Sep 20, 2022

/nephe-test-e2e-all

@reachjainrahul
Copy link
Contributor

/LGTM

@reachjainrahul reachjainrahul merged commit 7230887 into antrea-io:main Sep 21, 2022
@shenmo3 shenmo3 deleted the dependency-violation-fix branch September 21, 2022 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants