Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11494

galera_recovery script hard-codes the user

Details

    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?

      Attachments

        Issue Links

          Activity

            danblack Daniel Black added a comment -

            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.

            danblack Daniel Black added a comment - 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.

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

            jplindst Jan Lindström (Inactive) added a comment - This is a feature request but there is a workaround for it.

            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.

            GeoffMontee Geoff Montee (Inactive) added a comment - 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.

            People

              sysprg Julius Goryavsky
              GeoffMontee Geoff Montee (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.