stack.sh fails on fedora 25: mysqladmin error on setting password

Bug #1706125 reported by Antonio Caristia
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Expired
Undecided
Unassigned

Bug Description

The stack.sh script fails when it settings root password for mariadb

+./stack.sh:main:1017 configure_database
+lib/database:configure_database:128 configure_database_mysql
+lib/databases/mysql:configure_database_mysql:62 local my_conf mysql slow_log
+lib/databases/mysql:configure_database_mysql:63 echo_summary 'Configuring and starting MySQL'
+./stack.sh:echo_summary:426 [[ -t 3 ]]
+./stack.sh:echo_summary:426 [[ True != \T\r\u\e ]]
+./stack.sh:echo_summary:432 echo -e Configuring and starting MySQL
2017-07-24 16:34:54.917 | Configuring and starting MySQL
+lib/databases/mysql:configure_database_mysql:65 is_ubuntu
+functions-common:is_ubuntu:466 [[ -z rpm ]]
+functions-common:is_ubuntu:469 '[' rpm = deb ']'
+lib/databases/mysql:configure_database_mysql:68 is_suse
+functions-common:is_suse:454 [[ -z Fedora ]]
+functions-common:is_suse:458 [[ Fedora =~ (openSUSE) ]]
+functions-common:is_suse:458 [[ Fedora == \S\U\S\E\ \L\I\N\U\X ]]
+lib/databases/mysql:configure_database_mysql:68 is_oraclelinux
+functions-common:is_oraclelinux:427 [[ -z Fedora ]]
+functions-common:is_oraclelinux:431 '[' Fedora = OracleServer ']'
+lib/databases/mysql:configure_database_mysql:71 is_fedora
+functions-common:is_fedora:439 [[ -z Fedora ]]
+functions-common:is_fedora:443 '[' Fedora = Fedora ']'
+lib/databases/mysql:configure_database_mysql:72 mysql=mariadb
+lib/databases/mysql:configure_database_mysql:73 my_conf=/etc/my.cnf
+lib/databases/mysql:configure_database_mysql:74 local cracklib_conf=/etc/my.cnf.d/cracklib_password_check.cnf
+lib/databases/mysql:configure_database_mysql:75 '[' -f /etc/my.cnf.d/cracklib_password_check.cnf ']'
+lib/databases/mysql:configure_database_mysql:76 inicomment -sudo /etc/my.cnf.d/cracklib_password_check.cnf mariadb plugin-load-add
+inc/ini-config:inicomment:42 local xtrace
++inc/ini-config:inicomment:43 grep xtrace
++inc/ini-config:inicomment:43 set +o
+inc/ini-config:inicomment:43 xtrace='set -o xtrace'
+inc/ini-config:inicomment:44 set +o xtrace
+lib/databases/mysql:configure_database_mysql:83 is_fedora
+functions-common:is_fedora:439 [[ -z Fedora ]]
+functions-common:is_fedora:443 '[' Fedora = Fedora ']'
+lib/databases/mysql:configure_database_mysql:85 start_service mariadb
+functions-common:start_service:2416 '[' -x /bin/systemctl ']'
+functions-common:start_service:2417 sudo /bin/systemctl start mariadb
+lib/databases/mysql:configure_database_mysql:91 sudo mysqladmin -u root password secret
mysqladmin:
You cannot use 'password' command as mysqld runs
 with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead
+lib/databases/mysql:configure_database_mysql:91 true
+lib/databases/mysql:configure_database_mysql:94 sudo mysql -uroot -psecret -h127.0.0.1 -e 'GRANT ALL PRIVILEGES ON *.* TO '\''root'\''@'\''%'\'' identified by '\''secret'\'';'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
+lib/databases/mysql:configure_database_mysql:1 exit_trap
+./stack.sh:exit_trap:521 local r=1
++./stack.sh:exit_trap:522 jobs -p
+./stack.sh:exit_trap:522 jobs=
+./stack.sh:exit_trap:525 [[ -n '' ]]
+./stack.sh:exit_trap:531 '[' -f /tmp/tmp.Dlj9HbK63P ']'
+./stack.sh:exit_trap:532 rm /tmp/tmp.Dlj9HbK63P
+./stack.sh:exit_trap:536 kill_spinner
+./stack.sh:kill_spinner:417 '[' '!' -z '' ']'
+./stack.sh:exit_trap:538 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:539 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:540 generate-subunit 1500913915 180 fail
+./stack.sh:exit_trap:541 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:544 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2017-07-24-163455.txt for details
+./stack.sh:exit_trap:550 exit 1

description: updated
Revision history for this message
Aizuddin Zali (mymzbe) wrote :

Does the mysql installed prior to running stack.sh? The error is shown when mysql executed with --skip-grant-tables flag. So whenever the mysqladmin try to reset the password it will eventually fail because of no user grant table loaded.

From the stack.sh output, high chances that mysql was not started by stack.sh.

What is the `ps -ef|grep mysql` output?

Changed in devstack:
status: New → Incomplete
assignee: nobody → Aizuddin Zali (mymzbe)
status: Incomplete → New
status: New → Incomplete
Revision history for this message
Aizuddin Zali (mymzbe) wrote :

My suggestion is to unstack.sh.

Then:
1. systemctl stop mariadb
2. systemctl start mariadb
3. ps -ef|grep mariadb and check if the --skip-grant-tables still being used.
4. If all no grant table skipped flag, stop mariadb and re-run stack.sh

If there is grant table skip flag, you need to check your mysql init config or probably uninstall and re-install.

Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

@Aizuddin: The automatic expiry for bugs in status "Incomplete" doesn't seem to happen when there is an assignee, so I'm removing you from this bug.

Changed in devstack:
assignee: Aizuddin Zali (mymzbe) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for devstack because there has been no activity for 60 days.]

Changed in devstack:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.