-
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
bugfix: fix grep command without -w option causing prefix matched whi… #10291
bugfix: fix grep command without -w option causing prefix matched whi… #10291
Conversation
…le adding one etcd member
|
Welcome @yangsenzk! |
Hi @yangsenzk. 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. |
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.
Thanks a lot @yangsenzk I really like this fix :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mzaian, yangsenzk 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 |
/ok-to-test |
Thanks @yangsenzk Very Nice /lgtm |
…le adding one etcd member (kubernetes-sigs#10291)
bugfix: fix grep command without -w option causing prefix matched while adding one etcd member
What type of PR is this?
What this PR does / why we need it:
when add a new etcd member to the existing cluster, the ansible role of etcd will check if the new etcd member ip is already in cluster with grep command **etcdctl member list | grep -q {{ etcd_access_address }} **. There is a chance that the new member ip string is prefix matched one of existing members, then the Configure | Check if member is in etcd cluster task will success with rc=0. For example, if there is a member with ip 192.168.7.84 in the existing cluster and want to add a new etcd member with ip 192.168.7.8, then the check command will pass and won't execute member join command any more. One of the fix method is adding -w option for grep command, which mean whole words matching.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: