[MXS-3697] MaxCtrl config file check fails when executed from the root directory Created: 2021-07-28  Updated: 2021-07-29  Resolved: 2021-07-29

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl
Affects Version/s: 6.1.0
Fix Version/s: 6.1.1

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MXS-3699 MaxCtrl reads .maxctrl.cnf from incor... Closed

 Description   

The default config file check doesn't work in all cases as it fails with:

ENOENT: no such file or directory, stat '/~/.maxctrl.cnf'

This suggests that os.homedir() is empty and would make sense for users without home directories.

Turns out that this is caused by the path combination code assuming that the directory returned by process.cwd() never has a trailing slash which isn't the case when the process is started from the root directory.

A workaround to this problem is to change the current directory to anything other than the root directory (e.g. /tmp).


Generated at Thu Feb 08 04:23:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.