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

scale.yml failed because variables are overrided by roles/kubespray-defaults/defaults/main.yaml #7349

Closed
snowmansora opened this issue Mar 5, 2021 · 0 comments · Fixed by #7449
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@snowmansora
Copy link

snowmansora commented Mar 5, 2021

Environment:
Kubespray version (commit) (git rev-parse --short HEAD):
b7c2265
Network plugin used:
Flannel

When trying to add a new node via scale.yml, it failed at:

TASK [network_plugin/calico : Calico | Copy calicoctl binary from download dir] *************************************************************************************************************************************************************
fatal: [k8s-1]: FAILED! => {"changed": false, "msg": "Source /tmp/releases/calicoctl not found"}
fatal: [k8s-2]: FAILED! => {"changed": false, "msg": "Source /tmp/releases/calicoctl not found"}
fatal: [k8s-3]: FAILED! => {"changed": false, "msg": "Source /tmp/releases/calicoctl not found"}

I set kube_network_plugin to flannel in my group_vars, so calico tasks should never run and fail.
After troubleshooting, kube_network_plugin is set to calico because of:

include_vars: roles/kubespray-defaults/defaults/main.yaml

I think this is a bug because variables in roles/kubespray-defaults/defaults/main.yaml are not supposed to have such "high precedence", so it should never be used with include_vars.

@snowmansora snowmansora added the kind/bug Categorizes issue or PR as related to a bug. label Mar 5, 2021
@liupeng0518 liupeng0518 mentioned this issue Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant