From 3d8b857e868f79f1732dbab29c9e81acf8e4c733 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 30 May 2016 23:00:37 +0800 Subject: [PATCH] Fix the cinder backup permission issue when enable ceph Closes-Bug: #1587244 Change-Id: I22ed3c57e4669c4372daf448da8385729c7cc8d1 (cherry picked from commit b90ecae39cd4c495ccd6b16b663de12bafa279d8) --- ansible/roles/cinder/tasks/ceph.yml | 1 + ansible/roles/cinder/templates/cinder-backup.json.j2 | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/ansible/roles/cinder/tasks/ceph.yml b/ansible/roles/cinder/tasks/ceph.yml index a2db0101a4..abf4606d9b 100644 --- a/ansible/roles/cinder/tasks/ceph.yml +++ b/ansible/roles/cinder/tasks/ceph.yml @@ -52,5 +52,6 @@ mode: "0600" with_items: - { service_name: "cinder-volume", key_name: "cinder", content: "{{ cephx_key_cinder.stdout }}" } + - { service_name: "cinder-backup", key_name: "cinder", content: "{{ cephx_key_cinder.stdout }}" } - { service_name: "cinder-backup", key_name: "cinder-backup", content: "{{ cephx_key_cinder_backup.stdout }}" } when: inventory_hostname in groups['cinder-volume'] diff --git a/ansible/roles/cinder/templates/cinder-backup.json.j2 b/ansible/roles/cinder/templates/cinder-backup.json.j2 index 3e6c27b6ef..33929eca44 100644 --- a/ansible/roles/cinder/templates/cinder-backup.json.j2 +++ b/ansible/roles/cinder/templates/cinder-backup.json.j2 @@ -14,6 +14,13 @@ "perm": "0600", "optional": {{ (not enable_ceph | bool) | string | lower }} }, + { + "source": "{{ container_config_directory }}/ceph.client.cinder.keyring", + "dest": "/etc/ceph/ceph.client.cinder.keyring", + "owner": "cinder", + "perm": "0600", + "optional": {{ (not enable_ceph | bool) | string | lower }} + }, { "source": "{{ container_config_directory }}/ceph.conf", "dest": "/etc/ceph/ceph.conf",