I saw this error too today on Ubuntu 14.04 with the latest kolla Mitaka code.
TASK: [mariadb | Creating haproxy mysql user] ********************************* failed: [localhost] => {"attempts": 10, "changed": false, "cmd": ["docker", "exec", "-t", "kolla_toolbox", "/usr/bin/ansible", "localhost", "-m", "mysql_user", "-a", "login_host='192.168.122.201' login_port='3306' login_user='root' login_password='password' name='haproxy' password='' host='%'"], "delta": "0:00:00.767763", "end": "2016-03-01 21:35:40.843791", "failed": true, "rc": 2, "start": "2016-03-01 21:35:40.076028", "stdout_lines": ["localhost | FAILED! => {", " \"changed\": false, ", " \"failed\": true, ", " \"msg\": \"unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials. Exception message: (1130, \\\"Host '192.168.122.201' is not allowed to connect to this MariaDB server\\\")\"", "}"], "warnings": []} stdout: localhost | FAILED! => { "changed": false, "failed": true, "msg": "unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials. Exception message: (1130, \"Host '192.168.122.201' is not allowed to connect to this MariaDB server\")" } msg: Task failed as maximum retries was encountered
FATAL: all hosts have already failed -- aborting
PLAY RECAP ******************************************************************** to retry, use: --limit @/home/kolla/site.retry
localhost : ok=69 changed=1 unreachable=0 failed=1
Command failed ansible-playbook -i /usr/local/share/kolla/ansible/inventory/all-in-one -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e action=deploy /usr/local/share/kolla/ansible/site.yml --verbose --verbose --verbose --verbose kolla@kolla-ubuntu:~$
================
I was able to resolve this issue after following the steps given by Ashish (ashish-jain14) above in comment #13.
kolla@kolla-ubuntu:~$ sudo docker exec -i -t mariadb mysql -u root -ppassword -h 192.168.122.201
MariaDB [(none)]> use mysql;
MariaDB [mysql]> select host from mysql.user where User = 'root'; +--------------+ | host | +--------------+ | 127.0.0.1 | | ::1 | | kolla-ubuntu | | localhost | +--------------+ 4 rows in set (0.01 sec)
MariaDB [mysql]> exit
kolla-ubuntu is my hostname and 192.168.122.201 is my docker registry's IP address.
Now, replace "127.0.1.1 kolla-ubuntu" with "192.168.122.201 kolla-ubuntu" in /etc/hosts and save it.
docker rm -f mariadb
sudo kolla-ansible deploy
I saw this error too today on Ubuntu 14.04 with the latest kolla Mitaka code.
TASK: [mariadb | Creating haproxy mysql user] ******* ******* ******* ******* ***** host='192. 168.122. 201' login_port='3306' login_user='root' login_password= 'password' name='haproxy' password='' host='%'"], "delta": "0:00:00.767763", "end": "2016-03-01 21:35:40.843791", "failed": true, "rc": 2, "start": "2016-03-01 21:35:40.076028", "stdout_lines": ["localhost | FAILED! => {", " \"changed\": false, ", " \"failed\": true, ", " \"msg\": \"unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials. Exception message: (1130, \\\"Host '192.168.122.201' is not allowed to connect to this MariaDB server\\\")\"", "}"], "warnings": []}
failed: [localhost] => {"attempts": 10, "changed": false, "cmd": ["docker", "exec", "-t", "kolla_toolbox", "/usr/bin/ansible", "localhost", "-m", "mysql_user", "-a", "login_
stdout: localhost | FAILED! => {
"changed": false,
"failed": true,
"msg": "unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials. Exception message: (1130, \"Host '192.168.122.201' is not allowed to connect to this MariaDB server\")"
}
msg: Task failed as maximum retries was encountered
FATAL: all hosts have already failed -- aborting
PLAY RECAP ******* ******* ******* ******* ******* ******* ******* ******* ******* ***** kolla/site. retry
to retry, use: --limit @/home/
localhost : ok=69 changed=1 unreachable=0 failed=1
Command failed ansible-playbook -i /usr/local/ share/kolla/ ansible/ inventory/ all-in- one -e @/etc/kolla/ globals. yml -e @/etc/kolla/ passwords. yml -e action=deploy /usr/local/ share/kolla/ ansible/ site.yml --verbose --verbose --verbose --verbose ubuntu: ~$
kolla@kolla-
================
I was able to resolve this issue after following the steps given by Ashish (ashish-jain14) above in comment #13.
kolla@kolla- ubuntu: ~$ sudo docker exec -i -t mariadb mysql -u root -ppassword -h 192.168.122.201
MariaDB [(none)]> use mysql;
MariaDB [mysql]> select host from mysql.user where User = 'root';
+--------------+
| host |
+--------------+
| 127.0.0.1 |
| ::1 |
| kolla-ubuntu |
| localhost |
+--------------+
4 rows in set (0.01 sec)
MariaDB [mysql]> exit
kolla-ubuntu is my hostname and 192.168.122.201 is my docker registry's IP address.
Now, replace "127.0.1.1 kolla-ubuntu" with "192.168.122.201 kolla-ubuntu" in /etc/hosts and save it.
docker rm -f mariadb
sudo kolla-ansible deploy