From 6f9dd26caab18c4e4e98a78bc834f2fa5c255bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 30 Jan 2018 14:39:58 +0100 Subject: [PATCH] config: remove any spaces in public_network or cluster_network MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With two public networks configured - we found that with "NETWORK_ADDR_1, NETWORK_ADDR_2" install process consistently became broken, trying to find docker registry on second network, and not finding mon container. but without spaces "NETWORK_ADDR_1,NETWORK_ADDR_2" install succeeds so, containerized install is more peculiar with formatting of this line Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1534003 Signed-off-by: Sébastien Han --- group_vars/all.yml.sample | 2 +- group_vars/rhcs.yml.sample | 2 +- roles/ceph-config/templates/ceph.conf.j2 | 4 ++-- roles/ceph-defaults/defaults/main.yml | 2 +- roles/ceph-mon/templates/ceph-mon.service.j2 | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 5c2e35c21..e1c4035e7 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -348,7 +348,7 @@ dummy: # #journal_size: 5120 # OSD journal size in MB #public_network: 0.0.0.0/0 -#cluster_network: "{{ public_network }}" +#cluster_network: "{{ public_network | regex_replace(' ', '') }}" #osd_mkfs_type: xfs #osd_mkfs_options_xfs: -f -i size=2048 #osd_mount_options_xfs: noatime,largeio,inode64,swalloc diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index f9b5da70e..b18a9f765 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -348,7 +348,7 @@ ceph_repository: rhcs # #journal_size: 5120 # OSD journal size in MB #public_network: 0.0.0.0/0 -#cluster_network: "{{ public_network }}" +#cluster_network: "{{ public_network | regex_replace(' ', '') }}" #osd_mkfs_type: xfs #osd_mkfs_options_xfs: -f -i size=2048 #osd_mount_options_xfs: noatime,largeio,inode64,swalloc diff --git a/roles/ceph-config/templates/ceph.conf.j2 b/roles/ceph-config/templates/ceph.conf.j2 index 57a1df06e..9c5514441 100644 --- a/roles/ceph-config/templates/ceph.conf.j2 +++ b/roles/ceph-config/templates/ceph.conf.j2 @@ -112,10 +112,10 @@ mon host = {% if nb_mon > 0 %} {% endif %} {% if public_network is defined %} -public network = {{ public_network }} +public network = {{ public_network | regex_replace(' ', '') }} {% endif %} {% if cluster_network is defined %} -cluster network = {{ cluster_network }} +cluster network = {{ cluster_network | regex_replace(' ', '') }} {% endif %} {% if rgw_override_bucket_index_max_shards is defined %} rgw override bucket index max shards = {{ rgw_override_bucket_index_max_shards }} diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 1486bc50a..1368189ed 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -340,7 +340,7 @@ mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the # journal_size: 5120 # OSD journal size in MB public_network: 0.0.0.0/0 -cluster_network: "{{ public_network }}" +cluster_network: "{{ public_network | regex_replace(' ', '') }}" osd_mkfs_type: xfs osd_mkfs_options_xfs: -f -i size=2048 osd_mount_options_xfs: noatime,largeio,inode64,swalloc diff --git a/roles/ceph-mon/templates/ceph-mon.service.j2 b/roles/ceph-mon/templates/ceph-mon.service.j2 index 14f168dcb..9fe9d6774 100644 --- a/roles/ceph-mon/templates/ceph-mon.service.j2 +++ b/roles/ceph-mon/templates/ceph-mon.service.j2 @@ -58,7 +58,7 @@ ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i --net=host \ {%- endif %} -e CLUSTER={{ cluster }} \ -e FSID={{ fsid }} \ - -e CEPH_PUBLIC_NETWORK={{ public_network }} \ + -e CEPH_PUBLIC_NETWORK={{ public_network | regex_replace(' ', '') }} \ -e CEPH_DAEMON=MON \ {{ ceph_mon_docker_extra_env }} \ {{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}