From 16778e29be085d7485722e1bf8a3cb2bda7c22db Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Fri, 12 Jan 2018 08:14:44 -0600 Subject: [PATCH] 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 --- tasks/glance_pre_install.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tasks/glance_pre_install.yml b/tasks/glance_pre_install.yml index 50bafeb7..0c516a96 100644 --- a/tasks/glance_pre_install.yml +++ b/tasks/glance_pre_install.yml @@ -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: |