From 032234bad63fa4b9f8c04d31d1be26d97086a0fa Mon Sep 17 00:00:00 2001 From: zhubingbing <1392607554@qq.com> Date: Sat, 15 Oct 2016 17:53:37 +0800 Subject: [PATCH] Fix cinder upgrade permission issue Change-Id: If778c981cfcf020fcf0be6bf7e38a3243e63b85c Partial-Bug: #1631503 --- ansible/roles/cinder/templates/cinder-api.json.j2 | 12 ++++++++++++ ansible/roles/cinder/templates/cinder-backup.json.j2 | 12 ++++++++++++ .../roles/cinder/templates/cinder-scheduler.json.j2 | 12 ++++++++++++ ansible/roles/cinder/templates/cinder-volume.json.j2 | 12 ++++++++++++ 4 files changed, 48 insertions(+) diff --git a/ansible/roles/cinder/templates/cinder-api.json.j2 b/ansible/roles/cinder/templates/cinder-api.json.j2 index 7ffaf6fcaf..04b916981e 100644 --- a/ansible/roles/cinder/templates/cinder-api.json.j2 +++ b/ansible/roles/cinder/templates/cinder-api.json.j2 @@ -7,5 +7,17 @@ "owner": "cinder", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/lib/cinder", + "owner: "cinder:cinder", + "recurse": true + }, + { + "path": "/var/log/kolla/cinder", + "owner": "cinder:cinder", + "recurse": true + } ] } diff --git a/ansible/roles/cinder/templates/cinder-backup.json.j2 b/ansible/roles/cinder/templates/cinder-backup.json.j2 index fefb9d9c55..d42428ac16 100644 --- a/ansible/roles/cinder/templates/cinder-backup.json.j2 +++ b/ansible/roles/cinder/templates/cinder-backup.json.j2 @@ -14,5 +14,17 @@ "perm": "0700", "optional": {{ (not cinder_backend_ceph | bool) | string | lower }} }{% endif %} + ], + "permissions": [ + { + "path": "/var/lib/cinder", + "owner": "cinder:cinder", + "recurse": true + }, + { + "path": "/var/log/kolla/cinder", + "owner": "cinder:cinder", + "recurse": true + } ] } diff --git a/ansible/roles/cinder/templates/cinder-scheduler.json.j2 b/ansible/roles/cinder/templates/cinder-scheduler.json.j2 index 89f521d5a3..b5ef7b5481 100644 --- a/ansible/roles/cinder/templates/cinder-scheduler.json.j2 +++ b/ansible/roles/cinder/templates/cinder-scheduler.json.j2 @@ -7,5 +7,17 @@ "owner": "cinder", "perm": "0600" } + ], + "permissions": [ + { + "path": "/var/lib/cinder", + "owner": "cinder:cinder", + "recurse": true + }, + { + "path": "/var/log/kolla/cinder", + "owner": "cinder:cinder", + "recurse": true + } ] } diff --git a/ansible/roles/cinder/templates/cinder-volume.json.j2 b/ansible/roles/cinder/templates/cinder-volume.json.j2 index e82912ad03..db38911195 100644 --- a/ansible/roles/cinder/templates/cinder-volume.json.j2 +++ b/ansible/roles/cinder/templates/cinder-volume.json.j2 @@ -19,5 +19,17 @@ "owner": "cinder", "perm": "0600" }{% endif %} + ], + "permissions": [ + { + "path": "/var/lib/cinder", + "owner": "cinder:cinder", + "recurse": true + }, + { + "path": "/var/log/kolla/cinder", + "owner": "cinder:cinder", + "recurse": true + } ] }