-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Add retries to update calico-rr data in etcd through calicoctl #6505
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA. It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Welcome @marquetemb! |
Hi @marquetemb. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @mattymo |
Hi @mattymo! Can anyone take a look to this PR 😄? This fixes some spurious errors during installation, which force us to retray it several times in the worst scenario. Thanks! |
/ok-to-test |
/assign @Miouge1 |
Kind of strange way to do this, but afaik there is not a lof of possibilities with Ansible so.. |
This retry loop with block, include_task and rescue looks similar to some of the workarounds proposed in ansible/ansible#46203 Since the first task already has a retry loop would this work without a block all together? |
Yes, this feature (loop over block) is a long-term wish for a lot of users of ansible, but for now, we have to deal with it with workarounds. The block is necessary because you need to ensure that the second task "Calico-rr | Fetch current node object" (i think that you are refering to this when you point to the first task with the loop), and the third task are executed in a row, because the problem is that any change in etcd database between the read (second task) and the update (third task), would change the resourceVersion of etcd and the update will fail (because it has an outdated resourceVersion read it in the second task). |
I think it would make sense to add a comment and possibly a link to the Ansible issue about loops for blocks. Just for future reference. |
Done |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: marquetemb, Miouge1 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…netes-sigs#6505) * Add retries to update calico-rr data in etcd through calicoctl * Update update-node yaml syntax * Add comment to clarify ansible block loop * Remove trailing space
What type of PR is this?
/kind bug
What this PR does / why we need it:
Fix a race condition configuring router reflector with calicoctl. See #6504
Which issue(s) this PR fixes:
Fixes #6504
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE