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

/usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1

Details

    Description

      I have multiple maria db instance running on a centos 7.7 server (running until last update). After an update, the mysqld_multi did not start anymore (due to a typo that is apparently fixed in code). I updated the code and fixed the typo but one more modification done in the mysqld_multi script prevent the instance to start : the defaults-group-suffix variable.

      Since the update, this variable is added to the start command.

      /usr/bin/mysqld_safe --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 --datadir=/var/lib/mysql --server-id=1 --bind-address=0.0.0.0 --max_allowed_packet=64M --log-error=/var/log/mysqld1.log --symbolic-links=0 --defaults-group-suffix=mysqld1
      

      In the error log, I have:

      [ERROR] /usr/sbin/mysqld: unknown variable 'defaults-group-suffix=mysqld1'
      

      The only way to have my instances up, is to comment out the following code:

       if (!$suffix_found)
          {
            $com.= " --defaults-group-suffix=";
            $com.= $groups[$i];
          }
      

      This is not a real good solution

      Thx for helping.

      Attachments

        Issue Links

          Activity

            venizia03 Hi! Please tell me, what does the fragment of the mysqld_safe.sh file look like (or just mysqld_safe, without the .sh extension) if you look in it for the first substring of the form "--basedir=$MY_BASEDIR_VERSION"?

            In our GitHub repositories, all current versions (CS) look like this:

            for i in  "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
              "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
            do
              cmd="$cmd "`shell_quote_string "$i"`
            done
            

            And this is the correct code.

            But enterprise versions contain the wrong (actually just outdated) code:

            for i in  "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
              "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION"
            do
              cmd="$cmd "`shell_quote_string "$i"`
            done
            

            Your launch is more in line with the ES version than with the open-source one. The fact is that this flaw has already been fixed in head revisions on GitHub, so I can not reproduce it on 10.3/10.4 (CS, head revision). But I reproduced it using ES editions and now I made patch for our ES repositories as well - the patch is currently under the mtr testing.

            I am very thankful to you for the detailed information that helps to find the source of the problem!

            sysprg Julius Goryavsky added a comment - venizia03 Hi! Please tell me, what does the fragment of the mysqld_safe.sh file look like (or just mysqld_safe, without the .sh extension) if you look in it for the first substring of the form "--basedir=$MY_BASEDIR_VERSION"? In our GitHub repositories, all current versions (CS) look like this: for i in "$ledir/$MYSQLD" "$defaults_group_suffix" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \ "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION" do cmd="$cmd "`shell_quote_string "$i"` done And this is the correct code. But enterprise versions contain the wrong (actually just outdated) code: for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \ "--datadir=$DATADIR" "--plugin-dir=$plugin_dir" "$USER_OPTION" do cmd="$cmd "`shell_quote_string "$i"` done Your launch is more in line with the ES version than with the open-source one. The fact is that this flaw has already been fixed in head revisions on GitHub, so I can not reproduce it on 10.3/10.4 (CS, head revision). But I reproduced it using ES editions and now I made patch for our ES repositories as well - the patch is currently under the mtr testing. I am very thankful to you for the detailed information that helps to find the source of the problem!
            venizia03 Venizia added a comment - - edited

            Hi Julius,

            The code I have:

            for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \
            "-datadir=$DATADIR" "-plugin-dir=$plugin_dir" "$USER_OPTION"
            do
            cmd="$cmd "`shell_quote_string "$i"`
            done

            I so try to add the missing parameter in front but without success. The launched command is still the same and the error message too.

            venizia03 Venizia added a comment - - edited Hi Julius, The code I have: for i in "$ledir/$MYSQLD" "$defaults" "--basedir=$MY_BASEDIR_VERSION" \ "- datadir=$DATADIR" " -plugin-dir=$plugin_dir" "$USER_OPTION" do cmd="$cmd "`shell_quote_string "$i"` done I so try to add the missing parameter in front but without success. The launched command is still the same and the error message too.

            venizia03Hi! This change is not enough - other changes were made there to parse the value of the corresponding parameter. I am attaching the correct versions of mysqld_safe.sh and mysqld_multi.sh. This is the version for the CS edition. If you use Enterprise, I will update them soon too - I am now waiting for the readiness of our updated patch testing system (for ES) to verify patch. mysqld_multi.sh mysqld_safe.sh

            sysprg Julius Goryavsky added a comment - venizia03 Hi! This change is not enough - other changes were made there to parse the value of the corresponding parameter. I am attaching the correct versions of mysqld_safe.sh and mysqld_multi.sh. This is the version for the CS edition. If you use Enterprise, I will update them soon too - I am now waiting for the readiness of our updated patch testing system (for ES) to verify patch. mysqld_multi.sh mysqld_safe.sh
            sysprg Julius Goryavsky added a comment - Fixed, https://github.com/MariaDB/server/commit/748c97bc19b1e27e968a6eea684cc8930b634fa3
            venizia03 Venizia added a comment -

            Julius,

            Is there a wat to know when this fix will be available in the community version?

            Thx!

            venizia03 Venizia added a comment - Julius, Is there a wat to know when this fix will be available in the community version? Thx!

            People

              sysprg Julius Goryavsky
              venizia03 Venizia
              Votes:
              0 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.