-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Upgrading k8s yb cluster fails when bind address is private ip of pod #459
Comments
The parameter to control use of public ip mentions: Though the code in this API does not check for 'never' mode: Fixed by adding that check and ensuring a new master with old hostname and new ip comes up and joins the quorum as expected. |
…of pod. Summary: We wanted to use the public/broadcast address or hostname even if private ip changes (in kubernetes setup). The API for this, `UsePublicIp`, was missing a check to return true when `use_private_ip` is set to `never`. Test Plan: Tested via the following steps: - Added 127.0.0.1 as node1, and same for 2 & 3, in /etc/hosts. - Then started masters of a local RF=3 cluster (on Mac) using: ~/code/yugabyte/build/latest/bin/yb-master --webserver_interface 127.0.0.1 --rpc_bind_addresses=127.0.0.1 --server_broadcast_addresses=node1:7100 --master_addresses node1:7100,node2:7100,node3:7100 --fs_data_dirs "/tmp/yblocal1/" >& /tmp/yb-master_1.out & - Killed 3rd master. - Remapped node3 in /etc/hosts to 127.0.0.4. - Restarted yb-master with 127.0.0.4 for rpc/web addresses, but with node3 in broadcast. Ensured the new node became a follower in the quorum. Repeated the same with yb-tserver, but ran into an issue - tracked in #461. Reviewers: bogdan, sergei, karthik Reviewed By: karthik Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D5428
@bbaddepudi - could you please post the command params for yb-master and yb-tserver to get this working. |
Sample commands used to start yb-master and yb-tserver: ./bin/yb-tserver --webserver_interface 127.0.0.3 --rpc_bind_addresses=127.0.0.3 --server_broadcast_addresses=node3:9100 --tserver_master_addrs node1:7100,node2:7100,node3:7100 --fs_data_dirs "/tmp/yblocal3/" >& /tmp/yb-tserver_3.out & And after the /etc/hosts entry was changed, the |
Upon upgrading the yb-k8s cluster, the ip addresses of the various pods change. This causes the new nodes to not recognize the older ones. In a trial run after trying to upgrade the cluster, I see the following log spew on the yb-master:
Note that the peer ip address here are:
10.4.1.9
,10.4.0.9
,10.4.2.8
- which are the original ip addresses.But after the upgrade, the ip addresses are
10.4.1.11
,10.4.0.11
,10.4.2.11
:The tservers also are not able to locate the masters:
This diff changed the start command of yb master to bind on
POD_IP
(which is the private ip of the pod) instead of using the pod name. This is because of the master trying to infer if its present in the master addresses, but its breaking k8s functionality. Could we back out that change or use another way to detect this (like using broadcast addresses or resolving the hostname)? cc @bbaddepudi @kmuthukkThe text was updated successfully, but these errors were encountered: