permission error when linking tripleo-inventory in config-download ceph-ansible subdirecotry
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Committed
|
High
|
John Fulton |
Bug Description
During a non-standalone deployment using tripleo's current main branch of an undercloud built 1/17/21 the deployment failed shortly after:
"Use --start-at-task 'External deployment step 1' to resume from this task"
with the following error:
2021-01-17 16:13:59.276148 | 2442017e-
linking: [Errno 13] Permission denied: b'/home/
d/oc0/ceph-
inspection of config-download's permissions for stack oc0 show:
ls -lhtr /home/stack/
...
-rwxr-x---. 1 stack stack 6.6K Jan 17 16:01 ansible-
drwx------. 2 stack stack 80 Jan 17 16:02 group_vars
drwxr-xr-x. 5 tripleo-admin root 79 Jan 17 16:23 ceph-ansible
...
The way config-download is being run these days results in /home/stack/ config- download/ <STACK> being owned by stack:stack. The following task in tripleo_ ansible/ roles/tripleo_ ceph_work_ dir/tasks/ prepare. yml creates /home/stack/ config- download/ <STACK> /ceph-ansible
become: true
file:
path: "{{ item }}"
state: directory
owner: "{{ ansible_user }}"
The become results in this directory belonging to the group root and it would belong to the user root unless the ansible_user variable wasn't set. By simply removing the become and redeploying the directory has the preferred permission of stack:stack so the become is not necessary and introduces this bug.
Note that the tripleo_ ceph_work_ dir role is executed when the following part of deploy_ steps_playbook. yaml runs:
tasks: deploy_ steps_tasks_ step1.yaml" deploy_ steps_tasks_ step1.yaml' is exists"
- name: External deployment step 1
delegate_to: localhost
run_once: true
debug:
msg: Use --start-at-task 'External deployment step 1' to resume from this task
- include_tasks: "external_
when:
- "'external_
where external_ deploy_ steps_tasks_ step1.yaml does:
include_role: tripleo_ ceph_work_ dir
tasks_from: prepare.yml
So when it's run it has delegate_to: localhost.