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
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?