[yugabyted] Restarting a node fails when `data_dir` is missing in user specified configuration.
Closed this issue · 1 comments
ShikharSahay commented
Jira Link: DB-11983
Description
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.
Content of user config file -
13:03 ~/test $ cat user.test
{
"tserver_flags": "enable_automatic_tablet_splitting=false,ysql_pg_conf_csv={yb_bnl_batch_size=2048},ysql_hba_conf_csv={host all all 0.0.0.0/0 md5,host all all ::0/0 md5,host all all 0.0.0.0/0 scram-sha-256,host all all ::0/0 scram-sha-256}",
"master_flags": "enable_automatic_tablet_splitting=false"
}
13:03 ~/test $
Steps to reproduce the issue:
- Start the yugabyted node using:
./yugabyted start --config /net/dev-server-ssahay/share/test/user.test
- Stop the yugabyted node
- Restart the yugabyted node using:
./yugabyted start --config /net/dev-server-ssahay/share/test/user.test
We get the following error:
12:45 ~/code/yugabyte-db/bin [master] $ ./yugabyted start --config /net/dev-server-ssahay/share/test/user.test
Traceback (most recent call last):
File "./yugabyted", line 8765, in <module>
ControlScript().run()
File "./yugabyted", line 6730, in run
self.validate_and_set_parent_configs(args)
File "./yugabyted", line 5199, in validate_and_set_parent_configs
self.configs = self.handle_config_files(args, conf_dir, self.conf_file, base_dir)
File "./yugabyted", line 5150, in handle_config_files
path for path in user_configs.get("data_dir").split(',')
AttributeError: 'NoneType' object has no attribute 'split'
12:45 ~/code/yugabyte-db/bin [master] $
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.
ShikharSahay commented
Code changes landed.