]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
ceph-handler: Fix radosgw_address default value
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 4 Jul 2019 15:19:00 +0000 (11:19 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Sun, 7 Jul 2019 05:24:38 +0000 (07:24 +0200)
The rgw restart script set the RGW_IP variable depending on ansible
variables:
  - radosgw_address
  - radosgw_address_block
  - radosgw_interface

Those variables have default values defined in ceph-defaults role:

radosgw_interface: interface
radosgw_address: 0.0.0.0
radosgw_address_block: subnet

But in the rgw restart script we always use the radosgw_address value
instead of the radosgw_interface when defined because we aren't testing
the right default value.
As a consequence, the RGW_IP variable will be set to 0.0.0.0 even if
the ip address associated to the radosgw_interface variable is set
correctly. This causes the check_rest function to fail.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
roles/ceph-handler/templates/restart_rgw_daemon.sh.j2

index 327ab65e80190d4d6f26e7e51b6fb525516b82da..e0db85e7fb721a7406c4fb846b30e07c96a8ee51 100644 (file)
@@ -28,7 +28,7 @@ RGW_IP={{ hostvars[inventory_hostname]['radosgw_address'] }} \
     {% elif ip_version == 'ipv6' %}
 RGW_IP=[{{ hostvars[inventory_hostname]['radosgw_address'] }}] \
     {% endif %}
-{% elif radosgw_address is defined and radosgw_address != 'address' -%}
+{% elif radosgw_address is defined and radosgw_address != '0.0.0.0' -%}
     {% if ip_version == 'ipv4' %}
 RGW_IP={{ radosgw_address }} \
     {% elif ip_version == 'ipv6' %}