Bug 1850059
| Summary: | OC deploy fails on ceph-ansible generate ceph.conf - Failed to create temporary directory. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Pavel Sedlák <psedlak> | ||||||
| Component: | tripleo-ansible | Assignee: | John Fulton <johfulto> | ||||||
| Status: | CLOSED ERRATA | QA Contact: | Yogev Rabl <yrabl> | ||||||
| Severity: | urgent | Docs Contact: | |||||||
| Priority: | urgent | ||||||||
| Version: | 16.1 (Train) | CC: | fpantano, gfidente, johfulto, sdoran, spower, tvignaud | ||||||
| Target Milestone: | rc | Keywords: | Triaged | ||||||
| Target Release: | 16.1 (Train on RHEL 8.2) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | tripleo-ansible-0.5.1-0.20200611113655.34b8fcc.el8ost | Doc Type: | No Doc Update | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | |||||||||
| : | 1850978 1851190 (view as bug list) | Environment: | |||||||
| Last Closed: | 2020-07-29 07:53:29 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1850978 | ||||||||
| Attachments: |
|
||||||||
|
Description
Pavel Sedlák
2020-06-23 13:34:30 UTC
Created attachment 1698475 [details]
ansible.log
Full ansible.log of the first failure
(In reply to Pavel Sedlák from comment #0) > Jun 23 10:57:56 controller-0 ansible-lineinfile[48655]: [WARNING] Module remote_tmp /tmp/ceph_ansible_tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually - This was the first build with ansible 2.9.10 instead of 2.9.9 (it was changed last night) - 2.9.10 includes [1], i.e. this change https://github.com/ansible/ansible/issues/68218 - ceph-ansible and tripleo-ansible have not changed - an env 2.9.9 doesn't reproduce this problem [1] https://github.com/ansible/ansible/commit/60275fd9b4db4362f435a68590264963f5a494c8#diff-4b131dc1948ab542ad6aa59bc509cb52R88 As per this error: Jun 23 10:57:56 controller-0 ansible-lineinfile[48655]: [WARNING] Module remote_tmp /tmp/ceph_ansible_tmp did not exist and was created with a mode of 0700, this may cause issues when running as another user. To avoid this, create the remote_tmp dir with the correct permissions manually Ansible is suggesting I "create the remote_tmp dir with the correct permissions". This is because of a change introduced in ansible 2.9.10 https://github.com/ansible/ansible/issues/68218 My plan is to patch tripleo-ansible to do what they recommend. In other words: Have tripleo-ansible create the remote_tmp dir with the correct permissions before it runs ceph-ansible (which uses that remote_tmp dir). Created attachment 1698633 [details]
ceph-ansible execution with the upstream patch
Here is my assessment of what's happening:
In Ansible <= 2.9.9, there was a bug in `lineinfile` where it did not honor `ANSIBLE_REMOTE_TMP`, so the `lineinfile` task was _not_ creating `/tmp/ceph_ansible_tmp` and was most likely using `/tmp`. Since that bug was fixed, `/tmp/ceph_ansible_tmp` is being created by the `lineinfile` task and owned by `root` with `700` permissions.
Later in `ceph-ansible`, because `ANSIBLE_REMOTE_TEMP` is set to the same directory, it tries to use it but cannot because that task is not being run as `root`.
This can be solved by:
- explicitly creating `/tmp/ceph_ansible_tmp` with appropriate permissions
- using different remote tmp directories for whatever is running that `lineinfile` task and the `ceph-ansible` run
(In reply to Sam Doran from comment #17) > In Ansible <= 2.9.9, there was a bug in `lineinfile` where it did not honor `ANSIBLE_REMOTE_TMP` Thanks for the explanation. > This can be solved by: > - explicitly creating `/tmp/ceph_ansible_tmp` with appropriate permissions The fixing patch did exactly that. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:3148 |