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

Moving datadir completely breaks service startup on RPM based distros

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 11.8
    • None
    • Configuration, Packaging
    • None
    • Can result in unexpected behaviour

    Description

      The generated mysql.service file has the absolute path for the wsrep-start-position file hardcoded, and it turns out that path is hard coded to be the same as the default socket path (of all things).

      This works out ok when moving/removing /var/lib/mysql on Debian based distributions where the socket file is located under /run, but on RPM distros it is hardcoded to /var/lib/mysql/wsrep_start_position; and so service startup breaks when removing the default datadir.

      Even worse: it even fails on standalone servers that do not actually use Galera / wsrep at all.

      Suggested fix:

      • add RuntimeDirectory=mariadb to the service file
      • use /run/mariadb/wsrep_start_position path everywhere

      That way SystemD will take care of creating the directory under /run on service startup, and remove it again on service shutdown, so that it will always be present when needed

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              hholzgra Hartmut Holzgraefe
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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