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

Unable to remove standalone etcd node #11072

Open
MonolithProjects opened this issue Apr 10, 2024 · 0 comments
Open

Unable to remove standalone etcd node #11072

MonolithProjects opened this issue Apr 10, 2024 · 0 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@MonolithProjects
Copy link

What happened?

I am removing standalone etcd node (etcd on separate node - not on the master node).
Task [remove-node/remove-etcd-node : Make sure node_ip is set] is failing.

The previous task Lookup node IP in kubernetes Is trying to find the IP address of etcd node using kubectl get nodes <etcd node to be removed> ... command delegated to first etcd node. But this does not work on node which is not a member of k8s cluster (also the kubectl is not even installed on the node).

See roles/remove-node/remove-etcd-node/tasks/main.yml for more details

What did you expect to happen?

The playbook remove_node.yml will remove also standalone etcd node.

How can we reproduce it (as minimally and precisely as possible)?

Have a standalone etcd cluster (etcd nodes not on the k8s master nodes) and try to remove one etcd node

OS

AWX Execution environment based on centos:stream9 bud also my local environment:

Linux 6.8.4-200.fc39.x86_64 x86_64
NAME="Fedora Linux"
VERSION="39 (Workstation Edition)"
ID=fedora
VERSION_ID=39
VERSION_CODENAME=""
PLATFORM_ID="platform:f39"
PRETTY_NAME="Fedora Linux 39 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:39"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f39/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=39
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=39
SUPPORT_END=2024-11-12
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Version of Ansible

ansible [core 2.15.10]
config file = /home/mike/Documents/EMBL/kubespray-fork/ansible.cfg
configured module search path = ['/home/mike/Documents/EMBL/kubespray-fork/library']
ansible python module location = /home/mike/Documents/EMBL/kubespray-fork/kubespray-2.24.0/lib64/python3.12/site-packages/ansible
ansible collection location = /home/mike/.ansible/collections:/usr/share/ansible/collections
executable location = /home/mike/Documents/EMBL/kubespray-fork/kubespray-2.24.0/bin/ansible
python version = 3.12.2 (main, Feb 21 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] (/home/mike/Documents/EMBL/kubespray-fork/kubespray-2.24.0/bin/python3)
jinja version = 3.1.2
libyaml = True

Version of Python

Python 3.12.2

Version of Kubespray (commit)

64447e7

Network plugin used

calico

Full inventory with variables

don't think it's needed

Command used to invoke ansible

ansible-playbook -i ../inventory-kubespray/inventory.ini playbooks/remove_node.yml -e node=etcd03.example.com

Output of ansible run

LATEST_RELEASE=v2.24.0TASK [remove-node/remove-etcd-node : Make sure node_ip is set] ************************************************************************************************************
fatal: [ops-k1e01t.embl.de]: FAILED! => {
"assertion": "node_ip is defined and node_ip | length > 0",
"changed": false,
"evaluated_to": false,
"msg": "Etcd node ip is not set !"
}

Anything else we need to know

As a workaround i specified the node_ip variable as an extra var -e node_ip=<ip of the etcd node> for remove_node.yml playbook

@MonolithProjects MonolithProjects added the kind/bug Categorizes issue or PR as related to a bug. label Apr 10, 2024
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

No branches or pull requests

1 participant