From f41c27b7e9f245e744ca5bf17423bf8ae9589a27 Mon Sep 17 00:00:00 2001 From: gargsans-yb Date: Thu, 21 Nov 2024 14:09:57 +0000 Subject: [PATCH] [#25037]yugabyted: Node starts with hostname as advertise_address instead of private IP Summary: When starting a node, it starts with hostname as the advertise_address instead of the private IP of the machine. This behaviour is due to the recent commit to support hostname-based docker deployments. Fixing the issue. Jira: DB-14171 Test Plan: Manual Testing Reviewers: nikhil, djiang Reviewed By: djiang Subscribers: yugabyted-dev, sgarg-yb Differential Revision: https://phorge.dev.yugabyte.com/D40181 --- bin/yugabyted | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/yugabyted b/bin/yugabyted index 4049fa32cc63..d2ae13b094a1 100755 --- a/bin/yugabyted +++ b/bin/yugabyted @@ -7555,8 +7555,7 @@ class ControlScript(object): if args.advertise_address is None: if not self.configs.saved_data.get("advertise_address"): - - if str(os.path.exists("/.dockerenv")): + if os.path.exists("/.dockerenv"): args.advertise_address = self.find_hostname_of_node() else: if OS_NAME == "Linux":