From 196e70a75af804b1a98771c61a6ea275f5a87259 Mon Sep 17 00:00:00 2001 From: guihecheng Date: Wed, 23 Jan 2019 09:36:25 +0800 Subject: [PATCH] rgw/multisite: assign 'rgw_zone' to the exact section in ceph.conf since the following commit: commit 1ac94c048ff1d1385de2892d0ecef7879ec563e9 rgw: add support for multiple rgw instances on a single host we have multi-instance rgw support on a single host and the config section name of the rgw changed from [client.rgw.$(hostname)] -> [client.rgw.$(hostname).rgwX] when X is the sequence number: 0,1,2,... So we should assign 'rgw_zone' item to the exact rgw instance config section in ceph.conf Signed-off-by: guihecheng (cherry picked from commit a0590cae9d2da15bfa25da38ce5ac42eb7203502) --- roles/ceph-rgw/tasks/multisite/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/ceph-rgw/tasks/multisite/main.yml b/roles/ceph-rgw/tasks/multisite/main.yml index 18a646848..5a5bedb89 100644 --- a/roles/ceph-rgw/tasks/multisite/main.yml +++ b/roles/ceph-rgw/tasks/multisite/main.yml @@ -19,7 +19,10 @@ - name: add zone to rgw stanza in ceph.conf ini_file: dest: "/etc/ceph/{{ cluster }}.conf" - section: "client.rgw.{{ ansible_hostname }}" + section: "client.rgw.{{ ansible_hostname }}.{{ item.instance_name }}" option: "rgw_zone" value: "{{ rgw_zone }}" + with_items: "{{ rgw_instances }}" + when: + - rgw_instances is defined notify: restart rgw