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 race condition when unpausing MCP at the end of a noop-for-pool maintenance #120

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

bastjan
Copy link
Contributor

@bastjan bastjan commented Nov 15, 2024

The previous version was able to get into an invalid state: the upgrade job was updated twice (1, 2) at the end of an update and the k8s client cache does not guarantee read after write consistency 3. This lead to the MCPs being paused again just after force unpausing them.

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update tests.

…aintenance

The previous version was able to get into an invalid state: the upgrade job was updated twice ([1][1], [2][2]) at the end of an update and the k8s client cache does not guarantee read after write consistency [3][3]. This lead to the MCPs being paused again just after force unpausing them.

[1]: https://github.com/appuio/openshift-upgrade-controller/blob/0c1b407fd99a17ada4242a6454303911938377cd/controllers/upgradejob_controller.go#L939
[2]: https://github.com/appuio/openshift-upgrade-controller/blob/0c1b407fd99a17ada4242a6454303911938377cd/controllers/upgradejob_controller.go#L334
[3]: https://pkg.go.dev/sigs.k8s.io/controller-runtime#hdr-Clients_and_Caches
@bastjan bastjan requested a review from a team as a code owner November 15, 2024 10:29
@bastjan bastjan merged commit a28b8d4 into master Nov 15, 2024
3 checks passed
@bastjan bastjan deleted the fix-unpause-mcp branch November 15, 2024 12:28
@bastjan bastjan added the bug Something isn't working label Nov 15, 2024
@bastjan bastjan linked an issue Nov 25, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MachineConfigPool remains paused after no-op upgrade job
2 participants