From b818c7f832d53de2c797ef3e3a4bebf9bacf910e Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Fri, 9 Dec 2016 16:13:16 -0500 Subject: [PATCH] Properly distribute extra ceph client keys When adding extra ceph clusters, client keys are not currently distributed to hypervisors; This patch ensures that the keys are properly distributed and cleaned up by ansible. Change-Id: I3eb8fa201f4601565e88e0e68af68e9dfdadc88f --- ...istribute-extra-keys-d01164639ff9bdf9.yaml | 6 ++++++ tasks/ceph_auth_extra_compute.yml | 21 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 releasenotes/notes/distribute-extra-keys-d01164639ff9bdf9.yaml diff --git a/releasenotes/notes/distribute-extra-keys-d01164639ff9bdf9.yaml b/releasenotes/notes/distribute-extra-keys-d01164639ff9bdf9.yaml new file mode 100644 index 0000000..f260266 --- /dev/null +++ b/releasenotes/notes/distribute-extra-keys-d01164639ff9bdf9.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - Properly distrubute client keys to nova hypervisors + when extra ceph clusters are being deployed. + - Properly remove temporary files used to transfer + ceph client keys from the deploy host and hypervisors. diff --git a/tasks/ceph_auth_extra_compute.yml b/tasks/ceph_auth_extra_compute.yml index 4ae6c39..98dee8e 100644 --- a/tasks/ceph_auth_extra_compute.yml +++ b/tasks/ceph_auth_extra_compute.yml @@ -34,6 +34,18 @@ - ceph-config-create-config - ceph-config-extra +- name: Distribute extra key files + copy: + src: "/tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp" + dest: "/tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp" + with_items: "{{ ceph_extra_confs }}" + when: + - item.mon_host is defined + - item.client_name is defined + tags: + - ceph-config-create-config + - ceph-config-extra + - name: Remove temp extra key files file: path: "/etc/ceph/ceph.client.{{ item.client_name }}.key.tmp" @@ -166,3 +178,12 @@ with_items: "{{ ceph_extra_confs }}" tags: - always + +- name: Remove libvirt key file localhost + file: + path: "/tmp/{{ item.mon_host }}{{ item.client_name }}.key.tmp" + state: "absent" + delegate_to: localhost + with_items: "{{ ceph_extra_confs }}" + tags: + - always