Creating haproxy mysql user fails with permission denied

Bug #1616294 reported by Juan L. Negron
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Invalid
Low
Unassigned

Bug Description

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by Juan L. Negron (<email address hidden>) on branch: master
Review: https://review.openstack.org/359570
Reason: Per votes and comments, there are other commits under review that better address the issue.

Changed in kolla:
milestone: none → newton-rc2
status: New → Triaged
Changed in kolla:
status: Triaged → Invalid
importance: Undecided → Wishlist
milestone: newton-rc2 → newton-rc1
importance: Wishlist → Low
status: Invalid → Incomplete
milestone: newton-rc1 → newton-rc2
shake.chen (shake-chen)
Changed in kolla:
status: Incomplete → Invalid
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.