Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.5.34-galera, 5.5.34
    • Fix Version/s: 5.5
    • Component/s: None
    • Labels:
    • Environment:
      Debian/Ubuntu

      Description

      The init scripts for debian and ubuntu rely on a special user:
      'debian-sys-maint'@'localhost'
      MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"

      It has three tasks:
      1. Doing some local checks starting the mysqld.
      2. Some fancy status reporting.
      3. As mysqladmin is used to shutdown, the user is used to shutdown the mysqld.

      The problem with this approach is the credentials has to be stored disjunct in the filesystem (/etc/init.d/debian.cnf). So everytime the data in the schema changes you got to fix it in the configfile.
      So at least when you i.e.

      • Create a slave from a master dump
      • After an (initial) SST in Galera
        When you miss this, the most important thing is, you are not going to stop the mysqld.
        This is some kind of silly, as you don't even need mysqladmin to stop mysqld, as SIGTERM is sufficient.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            erkules erkan yanar added a comment -

            Hehe ok, this is related to https://mariadb.atlassian.net/browse/MDEV-703.
            There is at least code to shutdown mysql but never touched.

            Show
            erkules erkan yanar added a comment - Hehe ok, this is related to https://mariadb.atlassian.net/browse/MDEV-703 . There is at least code to shutdown mysql but never touched.
            Hide
            theaspect Constantine Linnick added a comment -

            Issued this during upgrade 10.0.6 to 10.0.7 twice out of few dozen instances

            Manual fix http://mirzmaster.wordpress.com/2009/01/16/mysql-access-denied-for-user-debian-sys-maintlocalhost/ after this "apt-get install -f" can proceed

            Show
            theaspect Constantine Linnick added a comment - Issued this during upgrade 10.0.6 to 10.0.7 twice out of few dozen instances Manual fix http://mirzmaster.wordpress.com/2009/01/16/mysql-access-denied-for-user-debian-sys-maintlocalhost/ after this "apt-get install -f" can proceed
            Hide
            danblack Daniel Black added a comment -

            A warning is better than nothing. I tried to push the debian.cnf into the datadir however the wsrep_sst_rsync is quite fussy about what it copies.

            --- mysql-new   2014-03-04 01:17:18.000000000 +0000
            +++ /etc/init.d/mysql   2014-03-04 02:59:48.000000000 +0000
            @@ -108,6 +108,22 @@
                        # Start MariaDB!
                        /usr/bin/mysqld_safe "${@:2}" > /dev/null 2>&1 &
            
            +           sst_transfer=0
            +           sst_progress_file=`mysqld_get_param datadir`/sst_in_progress
            +           if [ -x "$sst_progress_file" ]; then
            +               sst_transfer=1
            +               log_daemon_msg "SST of MariaDB database server in progress" "mysqld"
            +               for i in $(seq 1 "${MYSQLD_SST_TIMEOUT:-30}"); do
            +                   sleep 1
            +                   if [ ! -x "$sst_progress_file" ]; then
            +                       break;
            +                   fi
            +                   log_progress_msg "."
            +               done
            +           fi
            +           if [ $sst_transfer == 1 ]; then
            +               log_warning_msg "$0: WARNING: SST occured. Ensure /etc/mysql/debian.cnf is updated from a Galera cluster member"
            +           fi
                        # 6s was reported in #352070 to be too few when using ndbcluster
                        for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do
                             sleep 1
            
            Show
            danblack Daniel Black added a comment - A warning is better than nothing. I tried to push the debian.cnf into the datadir however the wsrep_sst_rsync is quite fussy about what it copies. --- mysql-new 2014-03-04 01:17:18.000000000 +0000 +++ /etc/init.d/mysql 2014-03-04 02:59:48.000000000 +0000 @@ -108,6 +108,22 @@ # Start MariaDB! /usr/bin/mysqld_safe "${@:2}" > /dev/null 2>&1 & + sst_transfer=0 + sst_progress_file=`mysqld_get_param datadir`/sst_in_progress + if [ -x "$sst_progress_file" ]; then + sst_transfer=1 + log_daemon_msg "SST of MariaDB database server in progress" "mysqld" + for i in $(seq 1 "${MYSQLD_SST_TIMEOUT:-30}"); do + sleep 1 + if [ ! -x "$sst_progress_file" ]; then + break; + fi + log_progress_msg "." + done + fi + if [ $sst_transfer == 1 ]; then + log_warning_msg "$0: WARNING: SST occured. Ensure /etc/mysql/debian.cnf is updated from a Galera cluster member" + fi # 6s was reported in #352070 to be too few when using ndbcluster for i in $(seq 1 "${MYSQLD_STARTUP_TIMEOUT:-30}"); do sleep 1
            Hide
            elenst Elena Stepanova added a comment -

            Otto Kekäläinen,

            Are you planning to make any radical changes around this debian-sys-maint user, or should we just apply the suggested warnings?

            Show
            elenst Elena Stepanova added a comment - Otto Kekäläinen , Are you planning to make any radical changes around this debian-sys-maint user, or should we just apply the suggested warnings?
            Hide
            otto Otto Kekäläinen added a comment -

            Elena Stepanova Yes, the whole debian-sys-maint user will be abandoned as we have transitioned to unix socket auth by default in Debian Sid.

            Show
            otto Otto Kekäläinen added a comment - Elena Stepanova Yes, the whole debian-sys-maint user will be abandoned as we have transitioned to unix socket auth by default in Debian Sid.

              People

              • Assignee:
                otto Otto Kekäläinen
                Reporter:
                erkules erkan yanar
              • Votes:
                2 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: