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

remove-node fails on "'proxy_disable_env' is undefined" #7801

Closed
sshimojo opened this issue Jul 15, 2021 · 8 comments
Closed

remove-node fails on "'proxy_disable_env' is undefined" #7801

sshimojo opened this issue Jul 15, 2021 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@sshimojo
Copy link

Environment:

  • Cloud provider or hardware configuration:
    GCP and Raspberry pi.

  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
    Linux 4.15.0-1098-gcp x86_64
    NAME="Ubuntu"
    VERSION="16.04.7 LTS (Xenial Xerus)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 16.04.7 LTS"
    VERSION_ID="16.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    VERSION_CODENAME=xenial
    UBUNTU_CODENAME=xenial

  • Version of Ansible (ansible --version):
    ansible 2.9.17
    config file = /home/ss/kubeedge/kubespray/ansible.cfg
    configured module search path = ['/home/ss/kubeedge/kubespray/library']
    ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible
    executable location = /usr/local/bin/ansible
    python version = 3.5.2 (default, Jan 26 2021, 13:30:48) [GCC 5.4.0 20160609]

  • Version of Python (python --version):
    Python 2.7.12

Kubespray version (commit) (git rev-parse --short HEAD):
934c8c5
or
7516fe1

Network plugin used:
flannel

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):

https://gist.github.com/sshimojo/7c3e52938b11ed3d56f6133525c75401

Command used to invoke ansible:

ansible-playbook -i inventory/mycluster3/hosts.yml -e node=k8s-n
ode1 -e reset_nodes=false -e allow_ungraceful_removal=true remove-node.yml

Output of ansible run:

TASK [Confirm Execution] ********************************************************************
fatal: [k8s-node1]: FAILED! => {"msg": "The field 'environment' has an invalid value, which i
ncludes an undefined variable. The error was: 'proxy_disable_env' is undefined\n\nThe error a
ppears to be in '/home/ss/kubeedge/kubespray/remove-node.yml': line 12, column 7, but may\nbe
elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears t
o be:\n\n tasks:\n - name: Confirm Execution\n ^ here\n"}

Anything else do we need to know:

I found the below to become a workaround. but there may be a better way.

https://g.ctech.rocks/mirrors-open-source/kubespray/commit/057e8b435877c8682c57f3bd5168728a07c7a9a9

@sshimojo sshimojo added the kind/bug Categorizes issue or PR as related to a bug. label Jul 15, 2021
@SimonGurney
Copy link

I can confirm this issue and agreed, issue seems to be around the missing default role.

SimonGurney added a commit to SimonGurney/kubespray that referenced this issue Jul 30, 2021
Fixes issues where an execution of remove-node.yml fails because a default value is not provided for proxy_disable_env
@SimonGurney
Copy link

As a workaround until its fixed, add the extra variable proxy_disable_env=false to the ansible -e

@sshimojo
Copy link
Author

@SimonGurney Thanks for fixing!

@SimonGurney
Copy link

Thanks @sshimojo but I don't think this should be closed out until the PR is merged. Do you agree?

@sshimojo
Copy link
Author

@SimonGurney Sorry, I agree.

@sshimojo sshimojo reopened this Jul 31, 2021
@SimonGurney
Copy link

This can be closed, fixed by #7729

@champtar
Copy link
Contributor

/close

@k8s-ci-robot
Copy link
Contributor

@champtar: Closing this issue.

In response to this:

/close

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.

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.

4 participants