Skip to content

Commit

Permalink
[#23052] yugabyted: Restarting a node fails when data_dir is missing …
Browse files Browse the repository at this point in the history
…in user specified configuration.

Summary:
When restarting yugabyted with a user configuration file that does not contain the `data_dir` parameter, an AttributeError is raised because the code attempts to call split on a `NoneType` object.
To fix the issue we simply check if the parameter is present in the given user configuration file, if it is not present then we do not split the parameter.
Jira: DB-11983

Test Plan: Manual Testing.

Reviewers: sgarg-yb, nikhil

Reviewed By: sgarg-yb, nikhil

Subscribers: shikhar.sahay

Differential Revision: https://phorge.dev.yugabyte.com/D36241
  • Loading branch information
ShikharSahay committed Jul 2, 2024
1 parent f3c4e14 commit 9388aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/yugabyted
Original file line number Diff line number Diff line change
Expand Up @@ -5145,7 +5145,7 @@ class ControlScript(object):
user_configs = Configs.parse_user_config_file(args.config)
# User should not be able to override data_dir
if (self.configs.saved_data.get("cluster_member")
and args.data_dir is None):
and args.data_dir is None and user_configs.get("data_dir")):
user_configs_data_dir = [
path for path in user_configs.get("data_dir").split(',')
]
Expand Down

0 comments on commit 9388aea

Please sign in to comment.