Creating haproxy mysql user fails with the following error:
fatal: [compute3.compute.ctolab]: FAILED! => {"changed": false, "cmd": ["docker", "exec", "-t", "kolla_toolbox", "/usr/bin/ansible", "localhost", "-m", "mysql_user", "-a", "login_host='10.2.2.196' login_port='3306' login_user='root' login_password='==redacted==' name='haproxy' password='' host='%' priv=*.*:USAGE"], "delta": "0:00:00.131424", "end": "2016-08-23 22:45:22.726360", "failed": true, "invocation": {"module_args": {"_raw_params": "docker exec -t kolla_toolbox /usr/bin/ansible localhost -m mysql_user -a \"login_host='10.2.2.196' login_port='3306' login_user='root' login_password='==redacted==' name='haproxy' password='' host='%' priv=*.*:USAGE\"", "_uses_shell": false, "chdir": null, "creates": null, "executable": null, "removes": null, "warn": true}, "module_name": "command"}, "rc": 1, "start": "2016-08-23 22:45:22.594936", "stderr": "", "stdout": "Traceback (most recent call last):\r\n File \"/usr/bin/ansible\", line 44, in <module>\r\n import ansible.constants as C\r\n File \"/usr/lib/python2.7/dist-packages/ansible/constants.py\", line 152, in <module>\r\n DEFAULT_LOCAL_TMP = get_config(p, DEFAULTS, 'local_tmp', 'ANSIBLE_LOCAL_TEMP', '$HOME/.ansible/tmp', istmppath=True)\r\n File \"/usr/lib/python2.7/dist-packages/ansible/constants.py\", line 78, in get_config\r\n os.makedirs(value, 0o700)\r\n File \"/usr/lib/python2.7/os.py\", line 157, in makedirs\r\n mkdir(name, mode)\r\nOSError: [Errno 13] Permission denied: '/home/ansible/.ansible/tmp'", "stdout_lines": ["Traceback (most recent call last):", " File \"/usr/bin/ansible\", line 44, in <module>", " import ansible.constants as C", " File \"/usr/lib/python2.7/dist-packages/ansible/constants.py\", line 152, in <module>", " DEFAULT_LOCAL_TMP = get_config(p, DEFAULTS, 'local_tmp', 'ANSIBLE_LOCAL_TEMP', '$HOME/.ansible/tmp', istmppath=True)", " File \"/usr/lib/python2.7/dist-packages/ansible/constants.py\", line 78, in get_config", " os.makedirs(value, 0o700)", " File \"/usr/lib/python2.7/os.py\", line 157, in makedirs", " mkdir(name, mode)", "OSError: [Errno 13] Permission denied: '/home/ansible/.ansible/tmp'"], "warnings": []}
Looking at the deployment order closer, I see that ceph uses kolla-toolbox to run ansible playbooks as root. Following tasks (mariadb being the next in line) fail because the user doesn't have access to:
- /home/ansible/.ansible/tmp
- /home/ansible/.ansible.cfg
- /var/log/kolla/ansible.log
Fixing the permissions on those files (something the ceph tasks should do on their own) fixes the problem.
Change abandoned by Juan L. Negron (<email address hidden>) on branch: master /review. openstack. org/359570
Review: https:/
Reason: Per votes and comments, there are other commits under review that better address the issue.