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

Release init-lock when the owner machine fails to launch #41

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

rahulbabu95
Copy link
Member

Issue #, if available:
https://github.com/aws/eks-anywhere-internal/issues/2715

Description of changes:
During the init process, etcdadm-bootstrap uses a init-lock for synchronization to ensure only the first machine runs the init command. If for some reason, the first machine that gets created is unable to launch we end up with a deadlock, as all other machines wait on the owning machine to release the lock. Check if the machine owning the lock exists, and release the lock if the machine isn't not found to prevent the deadlock situation.

Before:
2024-10-16T03:01:50Z INFO etcd-init-locker Waiting on another machine to initialize {"namespace": "eksa-system", "cluster-name": "rxc-cse-nifi-w1", "configmap-name": "rxc-cse-nifi-w1-etcd-lock", "machine-name": "rxc-cse-nifi-w1-etcd-9m4vv", "init-machine": "rxc-cse-nifi-w1-etcd-fwrmc”}

After:
2024-10-29T00:35:57Z INFO etcd-init-locker Machine that has acquired the lock not found, releasing the lock {"namespace": "eksa-system", "cluster-name": "rahul-mgmt-cs", "configmap-name": "rahul-mgmt-cs-etcd-lock", "machine-name": "rahul-mgmt-cs-etcd-cqrtw", "init-machine": "rahul-mgmt-cs-etcd-bxmp7"}

Testing:
Tested with a custom build and bundles override and deleted the first etcd machine that launched. The bootstrap controller was able to reconcile successfully.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Rahul Ganesh <rahulbabu95@gmail.com>
@rahulbabu95
Copy link
Member Author

/approve

@rahulbabu95 rahulbabu95 merged commit 585cf07 into aws:main Nov 1, 2024
1 check passed
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