-
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
Fix calico-node in etcd mode #10438
Fix calico-node in etcd mode #10438
Conversation
Hi @olevitt. 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. |
Hello @olevitt Thanks for your PR. I would suggest to use the default PR template also to have the bug note automatically generated for the next release. /ok-to-test |
@mzaian Thanks ! I changed the PR text to be in line with the default template. Feel free to amend anything you think may be improved. |
I'm curious why we haven't run into this issue before. Actually, this PR is just moving the config file to configMap. updated: refer to https://github.com/projectcalico/calico/blob/master/manifests/calico-etcd.yaml, In etcd mode, we should configure /lgtm |
@@ -95,13 +95,11 @@ spec: | |||
# Prevents the container from sleeping forever. | |||
- name: SLEEP | |||
value: "false" | |||
{% if calico_datastore == "kdd" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert this changes and add follwing env:
# The location of the etcd cluster.
- name: ETCD_ENDPOINTS
valueFrom:
configMapKeyRef:
name: calico-config
key: etcd_endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can test it in your cluster and see if works,
"nodename": "{{ calico_kubelet_name.stdout }}", | ||
{% else %} | ||
"nodename": "{{ calico_baremetal_nodename }}", | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
revert the changes, too
ping @olevitt, Can you please respond to me? /hold |
@cyclinder sorry for the delay. Here is my
|
thanks for the clarification @olevitt. calico_datastore Is it kdd on your cluster? I think there was the same issue before. I think your change applies to all cases. But look at https://github.com/projectcalico/calico/blob/master/manifests/calico-etcd.yaml, It seems we don't need K8S_NODE_NAME in calico etcd mode, I hope our calico manifests to be as consistent as possible with calico upstream. |
@cyclinder |
I think calico doesn't use nodeName in etcd mode, At least, https://github.com/projectcalico/calico/blob/master/manifests/calico-etcd.yaml don't set it.
thanks! Can you add ETCD_ENDPONINTS ENV to your calico-node? just like https://github.com/projectcalico/calico/blob/master/manifests/calico-etcd.yaml |
@olevitt Can you check @cyclinder comments ? As soon as it's ok the hold flag can be removed 👍 |
friendly ping ^^^ @olevitt |
@cyclinder Done. |
Thanks @olevitt
Yes, But we already added these variables. Your changes look good now, Thanks for your work👍 /hold cancel |
Chiming in, as our clusters also use calico in etcd mode. Maybe we could add that deployment mode to the CI test, wdyt @floryut |
Never hurt to add more cases to the CI tbh 👍 |
Once we confirm that the test in the linked PR catch the problem, could you add it to your PR (by rebasing or cherry-picking, whatever). That way we can be sure it does fix the problem and we'll catch future stuff. |
Sure, ping me when / if I need to rebase this PR. |
Yeah but I think Github handles that with write permission on the upstream, which I don't have, not sure who does.
Most merge go through the tide bot, so it's rarely needed (to have direct write permissions I mean).
|
Thanks @olevitt @VannTen @cyclinder 👍 merge the PR first so the test case can be added later :-) /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cyclinder, olevitt, yankay 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 |
Hi - will this fix also be added to a 2.23.2 release? The issue is preventing us from upgrading our cluster, and kubespray documentation specifies not to skip releases when upgrading (ie, we shouldn't go from 2.22 directly to 2.24), so we need a working 2.23 to give us an upgrade path. Thank you. |
* Calico : add ETCD endpoints to install-cni container * Calico : remove nodename from configmap in etcd mode
* Calico : add ETCD endpoints to install-cni container * Calico : remove nodename from configmap in etcd mode
This reverts commit 29ea790. Check that CI still catches that bug with node-etcd-client
* Calico : add ETCD endpoints to install-cni container * Calico : remove nodename from configmap in etcd mode
* CI: Document the 'all-in-one' layout + small refactoring (#10725) * Rename aio to all-in-one and document it ADTM. Acronyms don't tell much. * Refactor vm_count in tests provisioning * Add test case for calico using etcd datastore (#10722) * Add multinode ci layout * Add test case for calico using etcd datastore * Fix calico-node in etcd mode (#10438) * Calico : add ETCD endpoints to install-cni container * Calico : remove nodename from configmap in etcd mode --------- Co-authored-by: Olivier Levitt <[email protected]>
* Calico : add ETCD endpoints to install-cni container * Calico : remove nodename from configmap in etcd mode
What type of PR is this?
/kind bug
What this PR does / why we need it:
This PR fixes a regression introduced by #10177 which occurs when running in calico
etcd
mode.More details on #10436.
Which issue(s) this PR fixes:
Fixes #10436
Special notes for your reviewer:
This PR fixes a bug that is critical for users running calico in etcd mode. It may be useful to add this to the know issues for
v2.23.0
Does this PR introduce a user-facing change?:
Thanks for maintaining this great project 😍