From c036267b2c7da6a64cf0fbbf20957093eece93ad Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 9 Apr 2018 13:02:44 +0200 Subject: [PATCH] defaults: fix backward compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit backward compatibility with `ceph_mon_docker_interface` and `ceph_mon_docker_subnet` was not working since there wasn't lookup on `monitor_interface` and `public_network` Signed-off-by: Guillaume Abrioux (cherry picked from commit 66c4118dcd0c8e7a7081bce5c8d6ba7752b959fd) Signed-off-by: Sébastien Han --- group_vars/all.yml.sample | 8 ++++---- group_vars/rhcs.yml.sample | 8 ++++---- roles/ceph-defaults/defaults/main.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index b3bbb885a..bac243c3a 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -312,7 +312,7 @@ dummy: # These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml). # Eg. If you want to specify for each monitor which address the monitor will bind to you can set it in your **inventory host file** by using 'monitor_address' variable. # Preference will go to monitor_address if both monitor_address and monitor_interface are defined. -#monitor_interface: interface +#monitor_interface: "{{ ceph_mon_docker_interface if ceph_mon_docker_interface != 'interface' else 'interface' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #monitor_address: 0.0.0.0 #monitor_address_block: subnet # set to either ipv4 or ipv6, whichever your network is using @@ -322,7 +322,7 @@ dummy: ## OSD options # #journal_size: 5120 # OSD journal size in MB -#public_network: 0.0.0.0/0 +#public_network: "{{ ceph_mon_docker_subnet if ceph_mon_docker_subnet != '0.0.0.0/0' else '0.0.0.0/0' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #cluster_network: "{{ public_network | regex_replace(' ', '') }}" #osd_mkfs_type: xfs #osd_mkfs_options_xfs: -f -i size=2048 @@ -473,8 +473,8 @@ dummy: #ceph_docker_registry: docker.io #ceph_docker_enable_centos_extra_repo: false #ceph_docker_on_openstack: false -#ceph_mon_docker_interface: "{{ monitor_interface }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 -#ceph_mon_docker_subnet: "{{ public_network }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_interface: "interface" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_subnet: "0.0.0.0/0" # backward compatibility with stable-2.2, will disappear in stable 3.1 #mon_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #osd_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #mds_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index 781375fb4..cc02baff9 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -312,7 +312,7 @@ ceph_repository: rhcs # These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml). # Eg. If you want to specify for each monitor which address the monitor will bind to you can set it in your **inventory host file** by using 'monitor_address' variable. # Preference will go to monitor_address if both monitor_address and monitor_interface are defined. -#monitor_interface: interface +#monitor_interface: "{{ ceph_mon_docker_interface if ceph_mon_docker_interface != 'interface' else 'interface' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #monitor_address: 0.0.0.0 #monitor_address_block: subnet # set to either ipv4 or ipv6, whichever your network is using @@ -322,7 +322,7 @@ ceph_repository: rhcs ## OSD options # #journal_size: 5120 # OSD journal size in MB -#public_network: 0.0.0.0/0 +#public_network: "{{ ceph_mon_docker_subnet if ceph_mon_docker_subnet != '0.0.0.0/0' else '0.0.0.0/0' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 #cluster_network: "{{ public_network | regex_replace(' ', '') }}" #osd_mkfs_type: xfs #osd_mkfs_options_xfs: -f -i size=2048 @@ -473,8 +473,8 @@ ceph_repository: rhcs #ceph_docker_registry: docker.io #ceph_docker_enable_centos_extra_repo: false #ceph_docker_on_openstack: false -#ceph_mon_docker_interface: "{{ monitor_interface }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 -#ceph_mon_docker_subnet: "{{ public_network }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_interface: "interface" # backward compatibility with stable-2.2, will disappear in stable 3.1 +#ceph_mon_docker_subnet: "0.0.0.0/0" # backward compatibility with stable-2.2, will disappear in stable 3.1 #mon_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #osd_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 #mds_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index b29ece24a..50c6e4614 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -304,7 +304,7 @@ rbd_client_admin_socket_path: /var/run/ceph # must be writable by QEMU and allow # These variables must be defined at least in all.yml and overrided if needed (inventory host file or group_vars/*.yml). # Eg. If you want to specify for each monitor which address the monitor will bind to you can set it in your **inventory host file** by using 'monitor_address' variable. # Preference will go to monitor_address if both monitor_address and monitor_interface are defined. -monitor_interface: interface +monitor_interface: "{{ ceph_mon_docker_interface if ceph_mon_docker_interface != 'interface' else 'interface' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 monitor_address: 0.0.0.0 monitor_address_block: subnet # set to either ipv4 or ipv6, whichever your network is using @@ -314,7 +314,7 @@ mon_use_fqdn: false # if set to true, the MON name used will be the fqdn in the ## OSD options # journal_size: 5120 # OSD journal size in MB -public_network: 0.0.0.0/0 +public_network: "{{ ceph_mon_docker_subnet if ceph_mon_docker_subnet != '0.0.0.0/0' else '0.0.0.0/0' }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 cluster_network: "{{ public_network | regex_replace(' ', '') }}" osd_mkfs_type: xfs osd_mkfs_options_xfs: -f -i size=2048 @@ -465,8 +465,8 @@ ceph_docker_image_tag: latest ceph_docker_registry: docker.io ceph_docker_enable_centos_extra_repo: false ceph_docker_on_openstack: false -ceph_mon_docker_interface: "{{ monitor_interface }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 -ceph_mon_docker_subnet: "{{ public_network }}" # backward compatibility with stable-2.2, will disappear in stable 3.1 +ceph_mon_docker_interface: "interface" # backward compatibility with stable-2.2, will disappear in stable 3.1 +ceph_mon_docker_subnet: "0.0.0.0/0" # backward compatibility with stable-2.2, will disappear in stable 3.1 mon_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 osd_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 mds_containerized_deployment: False # backward compatibility with stable-2.2, will disappear in stable 3.1 -- 2.39.5