Skip to content

Commit

Permalink
[#25499]yugabyted: Fix the failing test org.yb.yugabyted.TestYugabyte…
Browse files Browse the repository at this point in the history
…dPgParity#testPgParity

Summary:
`org.yb.yugabyted.TestYugabytedPgParity#testPgParity` Test started failing in the [[ e1d5952 | commit ]]

Since the coredb itself adds `local all yugabyte trust` to `ysql_hba_conf`, removing the code in yugabyted to add it.
Jira: DB-14758

Test Plan: ./yb_build.sh --java-test 'org.yb.yugabyted.*'

Reviewers: nikhil

Reviewed By: nikhil

Subscribers: svc_phabricator, yugabyted-dev, sgarg-yb

Differential Revision: https://phorge.dev.yugabyte.com/D41057
  • Loading branch information
gargsans-yb committed Jan 9, 2025
1 parent 56ba1c4 commit dff2130
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions bin/yugabyted
Original file line number Diff line number Diff line change
Expand Up @@ -3804,7 +3804,7 @@ class ControlScript(object):
key, value = item.split('=')
tserver_pg_parity_flag_values_dict[key] = value

# Parse the PG_PARITY_FLAGS_DICT values into a dictionary
# Parse the PG_PARITY_FLAGS_DICT values into dictionary
pg_parity_flag_values_dict = {}
for item in pg_parity_flag_values.split(','):
if '=' in item:
Expand Down Expand Up @@ -3867,24 +3867,6 @@ class ControlScript(object):
# Handle simple flags
yb_tserver_cmd.append("--{}".format(tserver_flag))

hba_conf_updated = False
for i, flag in enumerate(yb_tserver_cmd):
if flag.startswith("--ysql_hba_conf_csv="):
pattern = re.compile(r'--ysql_hba_conf_csv=(["\']?)(.*)\1$')
match = pattern.match(flag)
# Extract the original ysql_hba_conf
quote_char = match.group(1) # This will be '' if there are no quotes
original_hba_conf = match.group(2)
# Append 'local all yugabyte trust' to the original_hba_conf
updated_hba_conf = original_hba_conf + ',local all yugabyte trust'

yb_tserver_cmd[i] = f'--ysql_hba_conf_csv={quote_char}' +\
f'{updated_hba_conf}{quote_char}'
hba_conf_updated = True

if not hba_conf_updated:
yb_tserver_cmd.extend(["--ysql_hba_conf_csv=local all yugabyte trust",])

if self.configs.saved_data.get("ysql_enable_auth"):
yb_tserver_cmd.extend(["--ysql_enable_auth=true"])

Expand Down

0 comments on commit dff2130

Please sign in to comment.