Set glance images dir owners each time
After a deployment of Queens, glance's images directory comes up with ownership of `root:root` when it should be `glance:glance`. This prevents an end user from uploading an image. This patch removes the stat check of the images directory and always ensures the directory is created. If the directory already exists, the create task will ensure that the directory has its ownership set appropriately. Closes-Bug: 1742951 Change-Id: I286d6fbdfdec932ea031916f5460710a23d68374
This commit is contained in:
parent
4e2dddf278
commit
16778e29be
@ -54,12 +54,6 @@
|
||||
- { path: "{{ glance_system_user_home }}/cache/registry" }
|
||||
- { path: "{{ glance_system_user_home }}/scrubber" }
|
||||
|
||||
- name: Stat the images directory
|
||||
stat:
|
||||
path: "{{ glance_system_user_home }}/images/"
|
||||
changed_when: false
|
||||
register: images_stat
|
||||
|
||||
- name: Create glance images dir
|
||||
file:
|
||||
path: "{{ glance_system_user_home }}/images/"
|
||||
@ -67,8 +61,6 @@
|
||||
owner: "{{ glance_system_user_name }}"
|
||||
group: "{{ glance_system_group_name }}"
|
||||
mode: "0755"
|
||||
when:
|
||||
- not images_stat.stat.exists | default(false) | bool
|
||||
|
||||
- name: Test for log directory or link
|
||||
shell: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user