ceph-handler: Fix radosgw_address default value

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>
pull/4207/head
Dimitri Savineau 2019-07-04 11:19:00 -04:00 committed by Guillaume Abrioux
parent 9c31811c33
commit 9cc5d1e903
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ RGW_IP={{ hostvars[inventory_hostname]['radosgw_address'] }} \
{% elif ip_version == 'ipv6' %} {% elif ip_version == 'ipv6' %}
RGW_IP=[{{ hostvars[inventory_hostname]['radosgw_address'] }}] \ RGW_IP=[{{ hostvars[inventory_hostname]['radosgw_address'] }}] \
{% endif %} {% 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' %} {% if ip_version == 'ipv4' %}
RGW_IP={{ radosgw_address }} \ RGW_IP={{ radosgw_address }} \
{% elif ip_version == 'ipv6' %} {% elif ip_version == 'ipv6' %}