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

mysqld_multi doesn't recognize include directive (not following includes)

Details

    Description

      Hello,
      we have multi-mariadb environments and decided to split my.cnf into few smaller configs for easier management and configuration support
      However, it came to my attention that mysqld_multi doesn't support includes, or in simple words - doesn't "respect" include setting in my.cnf
      This seems to be a very old behavior, since mysql 5.0
      http://bugs.mysql.com/bug.php?id=29327

      Some patches exist but I'd like to avoid patching it, better have it that functionality out of the box

      So wanted to ask if you can fix it

      Thanks!
      Alex

      Attachments

        Activity

          Do you want to provide (contribute) a patch which we could apply? It would probably go much faster this way.

          elenst Elena Stepanova added a comment - Do you want to provide (contribute) a patch which we could apply? It would probably go much faster this way.
          ShivaS Alex added a comment -

          Hi Elena,
          Thanks for replying!

          The patch was provided by one of the aforementioned task's commentators
          http://bugs.mysql.com/file.php?id=17400&bug_id=29327
          I haven't tested it but it looks like a simplest one, so should work.
          It adds just few more lines to cover both RedHat and Debian include paths (not sure about Debian though cause I am CentOS user)

          The only thing is that it's strictly searching under /etc/mysql.d/ path for *.cnf (in CentOS). (Maybe someone wants to have it under a different dir?)
          So probably looking for includedir in my.cnf is desirable. But I would stay with default as is, after all it's FHS compliant

          I don't mind if this patch will be included since that's the dir path I anyway planned to use and obviously my files would have *.cnf extension

          Thanks!

          p.s. found many reports about mysqld_multi include problem here and there, even on Percona forums
          I hope MariaDB can finally make it happen!

          ShivaS Alex added a comment - Hi Elena, Thanks for replying! The patch was provided by one of the aforementioned task's commentators http://bugs.mysql.com/file.php?id=17400&bug_id=29327 I haven't tested it but it looks like a simplest one, so should work. It adds just few more lines to cover both RedHat and Debian include paths (not sure about Debian though cause I am CentOS user) The only thing is that it's strictly searching under /etc/mysql.d/ path for *.cnf (in CentOS). (Maybe someone wants to have it under a different dir?) So probably looking for includedir in my.cnf is desirable. But I would stay with default as is, after all it's FHS compliant I don't mind if this patch will be included since that's the dir path I anyway planned to use and obviously my files would have *.cnf extension Thanks! p.s. found many reports about mysqld_multi include problem here and there, even on Percona forums I hope MariaDB can finally make it happen!

          It doesn't look like a real fix for the non-working directive problem, does it?
          Maybe I'm missing something, I'll leave it to serg to decide if it's a proper patch and whether it can be included.

          elenst Elena Stepanova added a comment - It doesn't look like a real fix for the non-working directive problem, does it? Maybe I'm missing something, I'll leave it to serg to decide if it's a proper patch and whether it can be included.
          ShivaS Alex added a comment -

          Yes, you are right, it doesn't look like the fix. more than that it doesn't work.
          I am including patch we wrote (and that works)

          What it does:

          • scans all found cnf files for !includedir
          • scans for *.cnf in !includedir directory
          • adds those files to previously found my.cnf (.my.cnf) files
          • passes all files to find_groups

          note:

          • it doesn't look for more !includedir directives in files found
          • it doesn't parse !include (for single files)

          Hope it helps and can be polished/included and finally released

          Thanks!

          ShivaS Alex added a comment - Yes, you are right, it doesn't look like the fix. more than that it doesn't work. I am including patch we wrote (and that works) What it does: scans all found cnf files for !includedir scans for *.cnf in !includedir directory adds those files to previously found my.cnf (.my.cnf) files passes all files to find_groups note: it doesn't look for more !includedir directives in files found it doesn't parse !include (for single files) Hope it helps and can be polished/included and finally released Thanks!

          People

            serg Sergei Golubchik
            ShivaS Alex
            Votes:
            1 Vote for this issue
            Watchers:
            4 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.