You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
Incorrect hostname being set in Kubernetes environment when server_broadcast_addresses gflag is set for tservers. When server_broadcast_addresses is set to hostnode ip, yb_servers() functions incorrectly returning broadcast_address as pod ip_address.
…etes environment
Summary:
The value of the 'host' column in the result of //yb_servers// function in Kubernetes environment is incorrect when server_broadcast address is also set for tservers. The value in 'host' should be exactly same as what the 'preferred_ip' shows while querying "system.peers" ycql table. This value is correct when server broadcast address is not passed in the startup argument. But when that is passed then this starts showing the value of what was passed for server broadcast address instead.
Additionally, this change also addresses some code review comments which on git commit: 6df6555 as pointed by @d-uspenskiy
- Use iterator on the returned server list instead of using 'at' to avoid throwing exception
- Refactor the code to move the pgalloc function call out from PgSession to pggate layer to avoid tight coupling of pg layer and the ybase layer.
- Proper return value checks at a couple of places.
- This also includes a change from @d-uspenskiy to make compiler warn about return value not being handled from function returning 'Status'
Test Plan: Tested with the unit test TestLoadBalance, manual testing and demo sample apps in jdbc-yugabtedb repository.
Reviewers: dmitry
Reviewed By: dmitry
Subscribers: dmitry, mihnea, zyu, yql
Differential Revision: https://phabricator.dev.yugabyte.com/D12494
I'm submitting a ...
Describe the issue
Incorrect hostname being set in Kubernetes environment when
server_broadcast_addresses
gflag is set for tservers. Whenserver_broadcast_addresses
is set to hostnode ip,yb_servers()
functions incorrectly returningbroadcast_address
as podip_address
.YCQL Output of
system.peers
table -YSQL yb_servers() output -
host column should be set to pod
ip_address
. Refer topreferred_ip
column insystem.peers
table.To Reproduce
setup a YugabyteDB
2.7.2.0-b216
using Helm Chart and runSELECT * FROM yb_servers();
Expected behaviour
host value should be set to
pod ip_address
.The text was updated successfully, but these errors were encountered: