Ansible openstack deploy fails with mysql error

I have been trying to install with the scripts from the webinar a few days ago. Consistently the install fails on the following step:

TASK: [create the external network] *******************************************
fatal: [cloud-controller] => failed to parse: /root/.ansible/tmp/ansible-1373991065.17-51641315664934/quantum_network:120: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
module.fail_json(msg = “Error authenticating to the keystone: %s” %e.message)
{“msg”: “Error authenticating to the keystone: Authorization Failed: Unable to communicate with identity service: {"error": {"message": "An unexpected error prevented the server from fulfilling your request. (OperationalError) (1045, \"Access denied for user ‘keystone’@‘localhost’ (using password: NO)\") None None", "code": 500, "title": "Internal Server Error"}}. (HTTP 500)”, “failed”: true}

FATAL: all hosts have already failed – aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/var/tmp/ansible/site.retry

cloud-compute : ok=15 changed=3 unreachable=0 failed=0
cloud-controller : ok=48 changed=8 unreachable=1 failed=0

I am running as root on centos 6.4 installed on bare metal. Any ideas?

can you do this without getting an exception?

[vagrant@controller ~]$ python
Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

from keystoneclient.v2_0 import client as ksclient
kc = ksclient.Client(username=‘admin’, password=‘secret’, tenant_name=‘admin’, auth_url=‘http://127.0.0.1:35357/v2.0/’)

If not, then check /var/log/keystone/keystone.log. Those credientials all the defaults from group_vars/all.

sorry, I missed the mysql bit. Check to see if the DB was setup right by running ‘mysql’ as root:

select user, host from mysql.user;
use keystone;
show tables;

Hi Michael,

could you also check if you have the following line in your keystone config.


[signing]

token_format = UUID

Regards,
Benno

I’ve hit the same error - same step. I just grabbed the latest 1.3 from git (july 29).

$ cat /etc/keystone/keystone.conf

[signing]
token_format = UUID

My sql db looks bad though. Duplicates.

from keystoneclient.v2_0 import client as ksclient

kc = ksclient.Client(username=‘admin’, password=‘secret’, tenant_name=‘admin’, auth_url=‘http://127.0.0.1:35357/v2.0/’)

fails with the same “Error authenticating keystone” for me.

Your mysql.user tables looks ok. What does your connection string in /etc/keystone/keystone.conf look like? Here is mine:

[sql]
connection = mysql://keystone:keystone@localhost/keystone

The password was taken from keystone_db_pass in group_vars/all when the template for keystone.conf in keystone.yml was run.

And I can do this ok:
$mysql -u keystone -pkeystone keystone

But without the password I get:
$ mysql -u keystone keystone
ERROR 1045 (28000): Access denied for user ‘keystone’@‘localhost’ (using password: NO)

Which I think is the error you are getting?

my [sql] connection is the same.

546 root:~$ mysql -u keystone -pkeystone keystone
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 113
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

exit
Bye
547 root:~$ mysql -u keystone keystone
ERROR 1045 (28000): Access denied for user ‘keystone’@‘localhost’ (using password: NO)
548 root:~$

<<<<<<<

I should have been more clear - running the ansible openstack playbook was failing for me at exactly the same task
TASK: [create the external network] *******************************************

but with a different error:

<10.0.9.170> ESTABLISH CONNECTION FOR USER: root
<10.0.9.170> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=root’, ‘-o’, ‘ConnectTimeout=10’, ‘10.0.9.170’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1375287449.19-5095015559057 && echo $HOME/.ansible/tmp/ansible-1375287449.19-5095015559057’”]
<10.0.9.170> REMOTE_MODULE quantum_network state=present login_username=admin login_password=secret provider_network_type=local login_tenant_name=admin name=external_network router_external=true
<10.0.9.170> PUT /var/folders/t2/h22337c12hn279xwd4s9fk7s8_088c/T/tmpzgjqhi TO /root/.ansible/tmp/ansible-1375287449.19-5095015559057/quantum_network
<10.0.9.170> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=root’, ‘-o’, ‘ConnectTimeout=10’, ‘10.0.9.170’, “/bin/sh -c ‘/usr/bin/python /root/.ansible/tmp/ansible-1375287449.19-5095015559057/quantum_network; rm -rf /root/.ansible/tmp/ansible-1375287449.19-5095015559057/ >/dev/null 2>&1’”]
failed: [Linux-OpenStack-Admin] => {“failed”: true, “item”: “”}
msg: Error in listing quantum networks: [Errno 111] Connection refused

I believe it is a problem with the quantum_network module and i’m trying to set up debugging right now so i can investigate further.
The error above could come from any of the following:

kbroughton:cloud$ grep -RH “Error in listing quantum networks” .
./quantum_floating_ip: module.fail_json(“Error in listing quantum networks: %s” % e.message)
./quantum_network: module.fail_json(msg = “Error in listing quantum networks: %s” % e.message)
./quantum_router_gateway: module.fail_json(“Error in listing quantum networks: %s” % e.message)
./quantum_subnet: module.fail_json(“Error in listing quantum networks: %s” % e.message)

i have prplem, when i login openstck dashboad , i have errror on keystone.log : WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 127.0.0.1 .

can you help me fix error.

Vào 04:50:58 UTC+7 Thứ Ba, ngày 30 tháng 7 năm 2013, kesten broughton đã viết: