mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
toolcontext: read all configuration sources when checking config values in lvm2-activation-generator through lighweight toolcontext handler
We added lightweight toolcontext handle to avoid useless initialization of some parts of the context and also to avoid problems when using the handle very soon at system boot, like in lvm2-activation-generator through lvm2app interface. However, we missed reading all the other config sources like lvmlocal.conf as well as any tag config - we need to read these too to get the final config value which may be overriden in any of these additional config sources. Currently, we use this lightweight toolcontext handle to read global/use_lvmetad and global/use_lvmpolld config values in lvm2-activation-generator using lvm2app interface (lvm_config_find_bool lvm2app function).
This commit is contained in:
parent
dbcfd59714
commit
b5e093624d
@ -1,5 +1,6 @@
|
||||
Version 2.02.166 -
|
||||
=====================================
|
||||
Fix lvm2-activation-generator to read all LVM2 config sources. (2.02.155)
|
||||
Fix lvchange-rebuild-raid.sh to cope with older target versions.
|
||||
Use dm_config_parse_without_dup_node_check() to speedup metadata reading.
|
||||
Fix lvconvert --repair regression
|
||||
|
@ -1787,10 +1787,27 @@ struct cmd_context *create_config_context(void)
|
||||
goto_out;
|
||||
|
||||
dm_list_init(&cmd->config_files);
|
||||
dm_list_init(&cmd->tags);
|
||||
|
||||
if (!_init_lvm_conf(cmd))
|
||||
goto_out;
|
||||
|
||||
if (!_init_hostname(cmd))
|
||||
goto_out;
|
||||
|
||||
if (!_init_tags(cmd, cmd->cft))
|
||||
goto_out;
|
||||
|
||||
/* Load lvmlocal.conf */
|
||||
if (*cmd->system_dir && !_load_config_file(cmd, "", 1))
|
||||
goto_out;
|
||||
|
||||
if (!_init_tag_configs(cmd))
|
||||
goto_out;
|
||||
|
||||
if (!(cmd->cft = _merge_config_files(cmd, cmd->cft)))
|
||||
goto_out;
|
||||
|
||||
return cmd;
|
||||
out:
|
||||
if (cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user