Skip to content

Commit

Permalink
[#20018] yugabyted: Error staring two different local RF-1 YugabyteDB…
Browse files Browse the repository at this point in the history
… instances on mac

Summary:
Currently on mac, starting two local RF-1 YugabyteDB instances using yugabyted where the first one has advertise address 127.0.0.1 causes the second one to
fail to start.

This is because a part of the yugabyted code tries to get the list of masters from the address in the provided join flag. If no join flag is given, which is the case
when starting the second node, it attempts to make a request to emptystring address, which on mac ends up resolving to 127.0.0.1.

The fix adds a check for empty join flag.
Jira: DB-8985

Test Plan: no test plan

Reviewers: nikhil

Reviewed By: nikhil

Subscribers: yugabyted-dev, djiang

Differential Revision: https://phorge.dev.yugabyte.com/D30439
  • Loading branch information
Daniel Jiang committed Nov 28, 2023
1 parent bce66a3 commit 3ddec04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/yugabyted
Expand Up @@ -2633,6 +2633,8 @@ class ControlScript(object):
# of the tserver. Use the node address given with the --join flag or use the
# advertise address if join flag is not provided.
def get_current_masters_from_api(self, tserverIp):
if not tserverIp:
return ""
tserver_addr = "{}:{}".format(tserverIp,
self.configs.saved_data.get("tserver_webserver_port"))
try:
Expand Down

0 comments on commit 3ddec04

Please sign in to comment.