Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
24.02.2
-
None
-
MXS-SPRINT-215
Description
If rebuild target server is running, the monitor asks it where its datadir is with "select @@datadir;". This returns the directory with / at the end, and the value is used as is in later commands ("rm -rf <datadir>/*" and "chown -R mysql:mysql <datadir>". The latter command can fail if MaxScale does not have full sudo privs and instead the command is enabled with a sudoers.d-file with a line like "johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql". The line is given in the documentation so may cause confusion.
To reduce chances of confusion, the documentation should include both:
johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql
|
johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql/
|
or perhaps alternatively
johnny ALL= NOPASSWD: /bin/chown -R mysql\:mysql /var/lib/mysql/*
|
The monitor should also remove the extra / from the directory returned by server.