LNST-project/lnst

lnst-ctl fails with "Unknown option: machine_pool_dirs in section environment"

jbenc opened this issue · 1 comments

jbenc commented

After an update, any invocation of lnst-ctl (including with --help) fails with:

$ lnst-ctl -h
Loading config file '/etc/lnst-ctl.conf'
Loading config file '/home/jbenc/.lnst/lnst-ctl.conf'
Traceback (most recent call last):
File "/bin/lnst-ctl", line 375, in
sys.exit(main())
File "/bin/lnst-ctl", line 226, in main
lnst_config.load_config(usr_cfg)
File "/usr/lib/python2.7/site-packages/lnst/Common/Config.py", line 219, in load_config
self.handleSections(sections, abs_path)
File "/usr/lib/python2.7/site-packages/lnst/Common/Config.py", line 227, in handleSections
self.handleOptions(section, sections[section], path)
File "/usr/lib/python2.7/site-packages/lnst/Common/Config.py", line 253, in handleOptions
raise ConfigError(msg)
lnst.Common.Config.ConfigError: Unknown option: machine_pool_dirs in section environment

I understand there was a change that allows greater flexibility but lnst-ctl should handle the current configs gracefully and not fail. I consider this a regression.

At least warn for several releases that the config option is deprecated and provide instructions to update the config. Updating should not break the program completely. Currently, the only option to find out what's going on and how to fix it is grepping the source code.

@jbenc if you still need the syntax:

[pools]
pool_name = /path

example:

[pools]
lnst = ./pool