ceph-ansible/roles/ceph-config/templates/ceph.conf.j2

249 lines
11 KiB
Plaintext
Raw Normal View History

#jinja2: trim_blocks: "true", lstrip_blocks: "true"
# {{ ansible_managed }}
[global]
{% if not cephx %}
auth cluster required = none
auth service required = none
auth client required = none
auth supported = none
{% endif %}
{% if ip_version == 'ipv6' %}
ms bind ipv6 = true
{% endif %}
{% if not containerized_deployment_with_kv and not containerized_deployment %}
fsid = {{ fsid }}
{% endif %}
{% if common_single_host_mode is defined and common_single_host_mode %}
osd crush chooseleaf type = 0
{% endif %}
{# NOTE (leseb): the blank lines in-between are needed otherwise we won't get any line break #}
{% set nb_mon = groups.get(mon_group_name, []) | length | int %}
{% set nb_client = groups.get(client_group_name, []) | length | int %}
{% set nb_osd = groups.get(osd_group_name, []) | length | int %}
{% if nb_mon > 0 and inventory_hostname in groups.get(mon_group_name, []) %}
mon initial members = {% for host in groups[mon_group_name] %}
{% if hostvars[host]['ansible_fqdn'] is defined and mon_use_fqdn -%}
{{ hostvars[host]['ansible_fqdn'] }}
{%- elif hostvars[host]['ansible_hostname'] is defined -%}
{{ hostvars[host]['ansible_hostname'] }}
{%- endif %}
{%- if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
{% if not containerized_deployment and not containerized_deployment_with_kv -%}
mon host = {% if nb_mon > 0 %}
{% for host in groups[mon_group_name] -%}
{% if monitor_address_block != 'subnet' %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}]
{%- endif %}
{% elif hostvars[host]['monitor_address'] is defined and hostvars[host]['monitor_address'] != '0.0.0.0' -%}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host]['monitor_address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host]['monitor_address'] }}]
{%- endif %}
{%- elif hostvars[host]['monitor_interface'] is defined -%}
{% set interface = 'ansible_' + hostvars[host]['monitor_interface'] %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
{%- endif %}
{%- else -%}
{% set interface = 'ansible_' + monitor_interface %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
{%- endif %}
{%- endif %}
{% if not loop.last -%},{%- endif %}
{%- endfor %}
{% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}
{{ external_cluster_mon_ips }}
{% endif %}
{%- endif %}
{% if containerized_deployment %}
fsid = {{ fsid }}
mon host = {% if nb_mon > 0 %}
{% for host in groups[mon_group_name] -%}
{% if monitor_address_block != 'subnet' %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}]
{%- endif %}
{% elif hostvars[host]['monitor_address'] is defined and hostvars[host]['monitor_address'] != '0.0.0.0' -%}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host]['monitor_address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host]['monitor_address'] }}]
{%- endif %}
{%- elif hostvars[host]['monitor_interface'] is defined -%}
{% set interface = 'ansible_' + hostvars[host]['monitor_interface'] %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
{%- endif %}
{%- else -%}
{% set interface = 'ansible_' + monitor_interface %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
{%- endif %}
{%- endif %}
{% if not loop.last -%},{%- endif %}
{%- endfor %}
{% elif nb_mon == 0 and inventory_hostname in groups.get(client_group_name, []) %}
{{ external_cluster_mon_ips }}
{% endif %}
{% endif %}
{% if public_network is defined %}
public network = {{ public_network }}
{% endif %}
{% if cluster_network is defined %}
cluster network = {{ cluster_network }}
{% endif %}
{% if rgw_override_bucket_index_max_shards is defined %}
rgw override bucket index max shards = {{ rgw_override_bucket_index_max_shards }}
{% endif %}
{% if rgw_bucket_default_quota_max_objects is defined %}
rgw bucket default quota max objects = {{ rgw_bucket_default_quota_max_objects }}
{% endif %}
{% if inventory_hostname in groups.get(client_group_name, []) %}
[client.libvirt]
admin socket = {{ rbd_client_admin_socket_path }}/$cluster-$type.$id.$pid.$cctid.asok # must be writable by QEMU and allowed by SELinux or AppArmor
log file = {{ rbd_client_log_file }} # must be writable by QEMU and allowed by SELinux or AppArmor
{% endif %}
{% if inventory_hostname in groups.get(osd_group_name, []) %}
{% if osd_objectstore == 'filestore' %}
[osd]
osd mkfs type = {{ osd_mkfs_type }}
osd mkfs options xfs = {{ osd_mkfs_options_xfs }}
osd mount options xfs = {{ osd_mount_options_xfs }}
osd journal size = {{ journal_size }}
{% if filestore_xattr_use_omap != None %}
filestore xattr use omap = {{ filestore_xattr_use_omap }}
{% elif osd_mkfs_type == "ext4" %}
filestore xattr use omap = true
{# else, default is false #}
{% endif %}
{% endif %}
{% endif %}
{% if groups[mds_group_name] is defined %}
{% if mds_group_name in group_names %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% if inventory_hostname in groups.get(mds_group_name, []) %}
2015-06-11 08:42:41 +08:00
{% for host in groups[mds_group_name] %}
{% if hostvars[host]['ansible_fqdn'] is defined and mds_use_fqdn %}
[mds.{{ hostvars[host]['ansible_fqdn'] }}]
host = {{ hostvars[host]['ansible_fqdn'] }}
{% elif hostvars[host]['ansible_hostname'] is defined %}
[mds.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% endif %}
{% if groups[rgw_group_name] is defined %}
{% if rgw_group_name in group_names %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% if inventory_hostname in groups.get(rgw_group_name, []) %}
2015-06-11 08:42:41 +08:00
{% for host in groups[rgw_group_name] %}
2014-03-20 19:14:43 +08:00
{% if hostvars[host]['ansible_hostname'] is defined %}
[client.rgw.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}/keyring
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
{% if hostvars[host]['radosgw_address_block'] is defined and hostvars[host]['radosgw_address_block'] != 'subnet' %}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% elif radosgw_address_block is defined and radosgw_address_block != 'subnet' -%}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ radosgw_address_block | ipaddr(radosgw_address_block) | first }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ radosgw_address_block | ipaddr(radosgw_address_block) | first }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% elif hostvars[host]['radosgw_address'] is defined and hostvars[host]['radosgw_address'] != 'address' -%}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ hostvars[host]['radosgw_address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ hostvars[host]['radosgw_address'] }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% elif radosgw_address is defined and radosgw_address != 'address' -%}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ radosgw_address }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ radosgw_address }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% elif hostvars[host]['radosgw_interface'] is defined -%}
{% set interface='ansible_' + hostvars[host]['radosgw_interface'] %}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ hostvars[host][interface][ip_version][0]['address'] }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% else %}
{% set interface='ansible_' + radosgw_interface %}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ hostvars[host][interface][ip_version][0]['address'] }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% endif %}
2014-03-20 19:14:43 +08:00
{% endif %}
2014-03-19 19:40:02 +08:00
{% endfor %}
{% endif %}
{% endif %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% endif %}
{% if groups[nfs_group_name] is defined %}
{% if nfs_group_name in group_names %}
{% if inventory_hostname in groups.get(nfs_group_name, []) and inventory_hostname not in groups.get(rgw_group_name, []) %}
{% for host in groups[nfs_group_name] %}
{% if nfs_obj_gw %}
{% if hostvars[host]['ansible_hostname'] is defined %}
[client.rgw.{{ hostvars[host]['ansible_hostname'] }}]
host = {{ hostvars[host]['ansible_hostname'] }}
keyring = /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ hostvars[host]['ansible_hostname'] }}/keyring
log file = /var/log/ceph/{{ cluster }}-rgw-{{ hostvars[host]['ansible_hostname'] }}.log
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% endif %}
{% if groups[restapi_group_name] is defined %}
{% if restapi_group_name in group_names %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% if inventory_hostname in groups.get(restapi_group_name, []) %}
[client.restapi]
{% if restapi_interface != "interface" %}
{% include 'client_restapi_interface.j2' %}
{% else %}
{% include 'client_restapi_address.j2' %}
{% endif %}
keyring = /var/lib/ceph/restapi/ceph-restapi/keyring
log file = /var/log/ceph/ceph-restapi.log
{% endif %}
{% endif %}
config: do not duplicate sections when doing collocation Prior to this commit, when collocating a RGW and NFS on the same box the ceph.conf layout was the following: [client.rgw.rgw0] host = mds0 host = rgw0 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100[client.rgw.mds0] rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw data = /var/lib/ceph/radosgw/test-rgw.rgw0 log file = /var/log/ceph/test-rgw-mds0.log log file = /var/log/ceph/test-rgw-rgw0.log [mds.mds0] host = mds0 [global] rgw override bucket index max shards = 16 fsid = 70e1d368-57b3-4978-b746-cbffce6e56b5 rgw bucket default quota max objects = 1638400 osd_pool_default_size = 1 public network = 192.168.15.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_pg_num = 8 cluster network = 192.168.16.0/24 [mds.rgw0] host = rgw0 [client.rgw.mds0] host = mds0 rgw data = /var/lib/ceph/radosgw/test-rgw.mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 log file = /var/log/ceph/test-rgw-mds0.log Basically appending all the sections. This commits solves that. Now the sections appear like this: -bash-4.2# cat /etc/ceph/test.conf [client.rgw.rgw0] log file = /var/log/ceph/test-rgw-rgw0.log host = rgw0 keyring = /var/lib/ceph/radosgw/test-rgw.rgw0/keyring rgw frontends = civetweb port=192.168.15.50:8080 num_threads=100 [client.rgw.mds0] log file = /var/log/ceph/test-rgw-mds0.log host = mds0 keyring = /var/lib/ceph/radosgw/test-rgw.mds0/keyring rgw frontends = civetweb port=192.168.15.70:8080 num_threads=100 [global] cluster network = 192.168.16.0/24 mon host = 192.168.15.10,192.168.15.11,192.168.15.12 osd_pool_default_size = 1 public network = 192.168.15.0/24 rgw bucket default quota max objects = 1638400 osd_pool_default_pg_num = 8 rgw override bucket index max shards = 16 fsid = 77a21980-3033-4174-9264-1abc7185bcb3 [mds.rgw0] host = rgw0 [mds.mds0] host = mds0 Signed-off-by: Sébastien Han <seb@redhat.com>
2017-10-08 21:16:40 +08:00
{% endif %}