[MDEV-11494] galera_recovery script hard-codes the user Created: 2016-12-06  Updated: 2019-05-20  Resolved: 2019-05-20

Status: Closed
Project: MariaDB Server
Component/s: Galera, Scripts & Clients
Affects Version/s: 10.1.19
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Julius Goryavsky
Resolution: Won't Do Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-14707 systemd: remove PermissionsStartOnly=... Open

 Description   

The user account used to start mysqld by the galera_recovery script is hard-coded, which can make it difficult to change. See the following:

$ grep "user" /usr/bin/galera_recovery
user="mysql"
  eval /usr/sbin/mysqld $cmdline_args --user=$user --wsrep_recover \
    # shows up in systemctl status output as a hint to the user.
  [ "$euid" = "0" ] && chown $user $log_file

Maybe it should use my_print_defaults to pull the user variable from configuration files instead, and only use the default if the variable isn't found?



 Comments   
Comment by Daniel Black [ 2018-02-22 ]

Yes, you're right.

Its even more horrible if you have multi-instance of different users.

Thinking user can be done away with in 10.3 with MDEV-14707

Still needs 10.1, 10.2 fix however.

Comment by Jan Lindström (Inactive) [ 2019-05-20 ]

This is a feature request but there is a workaround for it.

Comment by Geoff Montee (Inactive) [ 2019-05-20 ]

jplindst,

You closed this issue because you said that there is a workaround for this problem, but you never said what the workaround is. More details would be appreciated.

Are you referring to changing the "user" variable in the galera_recovery script? This is not a viable workaround for most users because:

1.) The workaround would have to be redone every time the MariaDB server package is upgraded, since the galera_recovery script would be replaced.

2.) It would not work for the multi-instance case that danblack mentioned, unless we say that if you use multi-instances with systemd, then it will only be supported if all instances run under the same user account.

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