[MDEV-6266] Changing password fails on galera cluster Created: 2014-05-23  Updated: 2014-05-28  Resolved: 2014-05-28

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.10-galera
Fix Version/s: 10.0.11-galera

Type: Bug Priority: Major
Reporter: Andrea Cervesato Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: galera, upstream
Environment:

Linux dbclu03 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.04


Attachments: Text File error.txt    

 Description   

Changin password on an already existing user cause the passwor dto be changed only on the node where the command has been originated and fails on the other nodes with slave running the command as anonymous error (see attachment for full log)



 Comments   
Comment by Andrea Cervesato [ 2014-05-23 ]

Additional packages informations:

root@dbclu03:~# lsb_release -r
Release: 14.04
root@dbclu03:~# uname -a
Linux dbclu03 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
root@dbclu03:~# dpkg -l |egrep 'maria|galera'
ii galera 25.3.5-wheezy amd64 Galera Replication Framework
ii libmariadbclient18 10.0.11+maria-1~trusty amd64 MariaDB database client library
ii libmysqlclient18 10.0.11+maria-1~trusty amd64 Virtual package to satisfy external depends
ii mariadb-client-10.0 10.0.11+maria-1~trusty amd64 MariaDB database client binaries
ii mariadb-client-core-10.0 10.0.11+maria-1~trusty amd64 MariaDB database core client binaries
ii mariadb-common 10.0.11+maria-1~trusty all MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
ii mariadb-galera-server 10.0.10+maria-1~trusty all MariaDB database server with Galera cluster (metapackage depending on the latest version)
ii mariadb-galera-server-10.0 10.0.10+maria-1~trusty amd64 MariaDB database server with Galera cluster binaries
ii mysql-common 10.0.11+maria-1~trusty all MariaDB database common files (e.g. /etc/mysql/my.cnf)

Comment by Andrea Cervesato [ 2014-05-23 ]

root@dbclu01:/etc/mysql# find . -type f
./debian-start
./conf.d/tokudb.cnf
./conf.d/mariadb.cnf
./conf.d/mysqld_safe_syslog.cnf
./conf.d/cluster.cnf
./debian.cnf
./my.cnf
root@dbclu01:/etc/mysql# find . -type f |xargs cat
#!/bin/bash
#

  1. This script is executed by "/etc/init.d/mysql" on every (re)start.
    #
  2. Changes to this file will be preserved when updating the Debian package.
    #

source /usr/share/mysql/debian-start.inc.sh

MYSQL="/usr/bin/mysql --defaults-file=/etc/mysql/debian.cnf"
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
MYUPGRADE="/usr/bin/mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf"
MYCHECK="/usr/bin/mysqlcheck --defaults-file=/etc/mysql/debian.cnf"
MYCHECK_SUBJECT="WARNING: mysqlcheck has found corrupt tables"
MYCHECK_PARAMS="--all-databases --fast --silent"
MYCHECK_RCPT="root"

  1. The following commands should be run when the server is up but in background
  2. where they do not block the server start and in one shell instance so that
  3. they run sequentially. They are supposed not to echo anything to stdout.
  4. If you want to disable the check for crashed tables comment
  5. "check_for_crashed_tables" out.
  6. (There may be no output to stdout inside the background process!)
    echo "Checking for corrupt, not cleanly closed and upgrade needing tables."
  1. Need to ignore SIGHUP, as otherwise a SIGHUP can sometimes abort the upgrade
  2. process in the middle.
    trap "" SIGHUP
    (
    upgrade_system_tables_if_necessary;
    check_root_accounts;
    check_for_crashed_tables;
    ) >&2 &

exit 0
[mariadb]

  1. See https://mariadb.com/kb/en/how-to-enable-tokudb-in-mariadb/
  2. for instructions how to enable TokuDB
    #
  3. See https://mariadb.com/kb/en/tokudb-differences/ for differences
  4. between TokuDB in MariaDB and TokuDB from http://www.tokutek.com/

#plugin-load-add=ha_tokudb.so

  1. MariaDB-specific config file.
  2. Read by /etc/mysql/my.cnf

[client]

  1. Default is Latin1, if you need UTF-8 set this (also in server section)
    #default-character-set = utf8

[mysqld]
#

  1. * Character sets
    #
  2. Default is Latin1, if you need UTF-8 set all this (also in client section)
    #
    #character-set-server = utf8
    #collation-server = utf8_general_ci
    #character_set_server = utf8
    #collation_server = utf8_general_ci
    [mysqld_safe]
    syslog
    [mysqld]
    query_cache_size=0
    binlog_format=ROW
    default-storage-engine=innodb
    innodb_autoinc_lock_mode=2
    query_cache_type=0
    bind-address=0.0.0.0
  1. Galera Provider Configuration
    wsrep_provider=/usr/lib/galera/libgalera_smm.so
    #wsrep_provider_options="gcache.size=32G"
  1. Galera Cluster Configuration
    wsrep_cluster_name="clu02"
    wsrep_cluster_address="gcomm://10.0.52.11,10.0.52.12,10.0.52.13"
  1. Galera Synchronization Congifuration
    wsrep_sst_method=rsync
    #wsrep_sst_method=xtrabackup-v2
    wsrep_sst_auth=admin:admin
  1. Galera Node Configuration
    wsrep_node_address="10.0.52.11"
    wsrep_node_name="dbclu01"
  2. Automatically generated for Debian scripts. DO NOT TOUCH!
    [client]
    host = localhost
    user = debian-sys-maint
    password = SUPASECRET
    socket = /db/data/mysql.sock
    [mysql_upgrade]
    host = localhost
    user = debian-sys-maint
    password = SUPASECRET
    socket = /db/data/mysql.sock
    basedir = /usr
  3. Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
  4. Configuration name db03.soteha.inc generated for andrea.cervesato@soteha.it at 2014-05-19 11:14:43

[mysql]

  1. CLIENT #
    port = 3306
    socket = /db/data/mysql.sock

[mysqld]
ignore-db-dir = lost+found

  1. GENERAL #
    user = mysql
    default-storage-engine = InnoDB
    socket = /db/data/mysql.sock
    pid-file = /db/data/mysql.pid
  1. MyISAM #
    key-buffer-size = 32M
    myisam-recover = FORCE,BACKUP
  1. SAFETY #
    max-allowed-packet = 16M
    max-connect-errors = 1000000
    skip-name-resolve
  1. DATA STORAGE #
    datadir = /db/data/
  1. BINARY LOGGING #
    log-bin = /db/data/mysql-bin
    expire-logs-days = 14
    sync-binlog = 1
  1. CACHES AND LIMITS #
    tmpdir = /db/temp
    tmp-table-size = 32M
    max-heap-table-size = 32M
    query-cache-type = 0
    query-cache-size = 0
    max-connections = 500
    thread-cache-size = 50
    open-files-limit = 65535
    table-definition-cache = 4096
    table-open-cache = 10240
  1. INNODB #
    innodb-flush-method = O_DIRECT
    innodb-log-files-in-group = 2
    innodb-log-file-size = 256M
    innodb-flush-log-at-trx-commit = 2
    innodb-file-per-table = 1
    innodb-buffer-pool-size = 12G
  1. LOGGING #
    log-error = /db/log/mysql-error.log
    log-queries-not-using-indexes = 1
    slow-query-log = 1
    slow-query-log-file = /db/log/mysql-slow.log

!includedir /etc/mysql/conf.d/
root@dbclu01:/etc/mysql#

Comment by Andrea Cervesato [ 2014-05-23 ]

They should set the 'thd->slave_thread' variable when they execute code like SET PASSWORD
The code, that gives this is:
sql_acl.cc:check_change_password()
if (!thd->slave_thread && !thd->security_ctx->priv_user[0])

{ my_message(ER_PASSWORD_ANONYMOUS_USER, ER(ER_PASSWORD_ANONYMOUS_USER), MYF(0)); return(1); }

Thx to montywi

Comment by Nirbhay Choubey (Inactive) [ 2014-05-28 ]

Fix pushed to maria-10.0-galera.

Generated at Thu Feb 08 07:10:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.