[MCOL-5066] mcsSetConfig does not consider configuration file option Created: 2022-04-29  Updated: 2022-09-08

Status: Open
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 6.2.3
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Oli Sennhauser Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: beginner-friendly
Environment:

Ubuntu 18.04



 Description   

Documentation an --help states, that mcsSetConfig should consider configuration file with -c option:

https://mariadb.com/docs/reference/col6/cli/mcsSetConfig/#col6-cli-mcssetconfig-options

mcsSetConfig --help
usage: mcsSetConfig [-vdhx] [-c config_file] section param value
Updates configuration variable param in section section with value.
-c config_file use config file config_file
-v display verbose information
-d don't perform misc checks and don't try to distribute the config file
after changes are made
-x delete the param from section (value is still required but ignored)
-h display this help text

When we try to do this is aborts with an error and even core dumps:

mcsSetConfig -c /home/mysql/database/mcs-623/etc/Columnstore.xml CrossEngineSupport Host 127.0.0.1
terminate called after throwing an instance of 'std::runtime_error'
what(): Config::Config: error accessing config file /etc/columnstore/Columnstore.xml
Aborted (core dumped)

Strace shows that mcsSetConfig does not even consider the location but just the default: /etc/columnstore/Columnstore.xml

strace mcsSetConfig -c /home/mysql/database/mcs-623/etc/Columnstore.xml CrossEngineSupport Host 127.0.0.1 2>&1 | grep xml
openat(AT_FDCWD, "/home/mysql/product/mariadb-columnstore-6.2.3/lib/mysql/libxml2.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/home/mysql/product/mariadb-columnstore-6.2.3/lib/x86_64-linux-gnu/libxml2.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libxml2.so.2", O_RDONLY|O_CLOEXEC) = 3
access("/etc/columnstore/Columnstore.xml", R_OK) = -1 ENOENT (No such file or directory)
access("/etc/columnstore/Columnstore.xml", R_OK) = -1 ENOENT (No such file or directory)
write(2, "Config::Config: error accessing "..., 76Config::Config: error accessing config file /etc/columnstore/Columnstore.xml) = 76

Linking from the default location causes at least another error...


Generated at Thu Feb 08 02:55:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.