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

Automated cherry pick of #6696: More robust system Tier creation / update (#6696) #6724

Conversation

antoninbas
Copy link
Contributor

Cherry pick of #6696 on release-2.0.

#6696: More robust system Tier creation / update (#6696)

For details on the cherry pick process, see the cherry pick requests page.

@antoninbas antoninbas added the kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release label Oct 8, 2024
@antoninbas

This comment was marked as outdated.

@antoninbas antoninbas closed this Oct 8, 2024
@antoninbas antoninbas reopened this Oct 9, 2024
System Tier initialization should ideally wait for the Tier informer's
cache to sync before using the lister.  Otherwise we may think that the
system Tiers have not been created yet when in fact it is just the
informer that has not completed the initial List operation.

Additionally, we improve the logic in system Tier initialization:
* After every failed API call, we should probably check the state of the
  informer cache again (via the lister) and decide which step is needed
  next (creation / update / nothing). In case of a failed create or
  update, this gives us the opportunity to check again if the Tier
  actually exists, and if yes, what its priority is.
* AlreadyExists is no longer treated differently for create. The reason
  is that if the Tier already exists and for some reason it was not
  returned by the Lister, it will probably be the validation webhook
  that fails (overlapping priority), and the error won't match
  AlreadyExists.

Related to antrea-io#6694

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas antoninbas force-pushed the automated-cherry-pick-of-#6696-upstream-release-2.0 branch from 6f2c3e1 to 101361b Compare October 9, 2024 21:10
@antoninbas
Copy link
Contributor Author

/test-all

@antoninbas antoninbas merged commit 2e8f1b7 into antrea-io:release-2.0 Oct 10, 2024
50 of 59 checks passed
@antoninbas antoninbas deleted the automated-cherry-pick-of-#6696-upstream-release-2.0 branch October 10, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cherry-pick Categorizes issue or PR as related to the cherry-pick of a bug fix from the main branch to a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants