From db0138b2f9150a8883c7ff8c93965ab03a043b3c Mon Sep 17 00:00:00 2001 From: ERIK Date: Sat, 31 Aug 2024 15:20:44 +0800 Subject: [PATCH] fix: incorrect member matching when removing etcd nodes (#11488) Signed-off-by: bo.jiang --- roles/remove-node/remove-etcd-node/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/remove-node/remove-etcd-node/tasks/main.yml b/roles/remove-node/remove-etcd-node/tasks/main.yml index 70e33251a..f0f0e17c9 100644 --- a/roles/remove-node/remove-etcd-node/tasks/main.yml +++ b/roles/remove-node/remove-etcd-node/tasks/main.yml @@ -26,7 +26,7 @@ - inventory_hostname in groups['etcd'] - name: Lookup etcd member id - shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep {{ node_ip }} | cut -d, -f1" + shell: "set -o pipefail && {{ bin_dir }}/etcdctl member list | grep -w {{ node_ip }} | cut -d, -f1" args: executable: /bin/bash register: etcd_member_id