]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-rgw: Fix bad paths which depend on the clustername
authorFrançois Lafont <francois.lafont@ac-versailles.fr>
Sat, 6 Apr 2019 09:44:03 +0000 (11:44 +0200)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Tue, 9 Apr 2019 14:44:45 +0000 (10:44 -0400)
The path of the RGW environment file (in the /var/lib/ceph/radosgw/
directory) depends on the Ceph clustername. It was not taken into
account in the Ansible role `ceph-rgw`.

Signed-off-by: flaf <francois.lafont.1978@gmail.com>
(cherry picked from commit 4c3e77d8690a7be4fb89f7292c51f8644faaeafa)

roles/ceph-rgw/tasks/docker/start_docker_rgw.yml
roles/ceph-rgw/templates/ceph-radosgw.service.j2

index 924c8c00968d3036bc2e745f5dcc87af93987829..e48d0b9066d91e058ebb25e2b46e7d3d5e45ed96 100644 (file)
@@ -2,7 +2,7 @@
 - name: generate environment file
   become: true
   copy:
-    dest: "/var/lib/ceph/radosgw/ceph-rgw.{{ ansible_hostname }}.{{ item.instance_name }}/EnvironmentFile"
+    dest: "/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_hostname }}.{{ item.instance_name }}/EnvironmentFile"
     owner: "root"
     group: "root"
     mode: "0644"
index 4368da9d20463fc0ead4b7954574f7aaf5b07c73..a5ac9497389a5da159c3cb1da9b2c85ff90bee8a 100644 (file)
@@ -6,7 +6,7 @@ After=docker.service
 {% set cpu_limit = ansible_processor_vcpus|int if ceph_rgw_docker_cpu_limit|int > ansible_processor_vcpus|int else ceph_rgw_docker_cpu_limit|int %}
 
 [Service]
-EnvironmentFile=/var/lib/ceph/radosgw/ceph-%i/EnvironmentFile
+EnvironmentFile=/var/lib/ceph/radosgw/{{ cluster }}-%i/EnvironmentFile
 ExecStartPre=-/usr/bin/{{ container_binary }} stop ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
 ExecStartPre=-/usr/bin/{{ container_binary }} rm ceph-rgw-{{ ansible_hostname }}-${INST_NAME}
 ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \