diff --git a/group_vars/mdss.yml.sample b/group_vars/mdss.yml.sample index 592421b5c..c1f77d6af 100644 --- a/group_vars/mdss.yml.sample +++ b/group_vars/mdss.yml.sample @@ -30,11 +30,15 @@ dummy: #ceph_mds_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" #ceph_mds_docker_cpu_limit: 4 -# we currently for MDS_NAME to hostname because of a bug in ceph-docker -# fix here: https://github.com/ceph/ceph-docker/pull/770 -# this will go away soon. -#ceph_mds_docker_extra_env: -e MDS_NAME={{ ansible_facts['hostname'] }} #ceph_config_keys: [] # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +#ceph_mds_container_params: +# volumes: +# - /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z +# - /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z +# args: +# - -f +# - -i={{ ansible_facts['hostname'] }} ########### diff --git a/group_vars/mgrs.yml.sample b/group_vars/mgrs.yml.sample index 252a5a6a6..d353ed4e9 100644 --- a/group_vars/mgrs.yml.sample +++ b/group_vars/mgrs.yml.sample @@ -40,12 +40,18 @@ dummy: # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_mgr_docker_extra_env' variable. #ceph_mgr_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" #ceph_mgr_docker_cpu_limit: 1 -#ceph_mgr_docker_extra_env: #ceph_config_keys: [] # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +#ceph_mgr_container_params: +# volumes: +# - /var/lib/ceph/mgr:/var/lib/ceph/mgr:z,rshared +# - /var/lib/ceph/bootstrap-mgr:/var/lib/ceph/bootstrap-mgr:z +# args: +# - -f +# - -i={{ ansible_facts['hostname'] }} ########### diff --git a/group_vars/mons.yml.sample b/group_vars/mons.yml.sample index ac66172d0..c6892208b 100644 --- a/group_vars/mons.yml.sample +++ b/group_vars/mons.yml.sample @@ -44,18 +44,26 @@ dummy: # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_mon_docker_extra_env' variable. #ceph_mon_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" #ceph_mon_docker_cpu_limit: 1 #ceph_mon_container_listen_port: 3300 -# Use this variable to add extra env configuration to run your mon container. -# If you want to set a custom admin keyring you can set this variable like following: -# ceph_mon_docker_extra_env: -e ADMIN_SECRET={{ admin_secret }} -#ceph_mon_docker_extra_env: +# Use this variable to modify the configuration to run your mon container. #mon_docker_privileged: false #mon_docker_net_host: true #ceph_config_keys: [] # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +#ceph_mon_container_params: +# volumes: +# - /var/lib/ceph/mon:/var/lib/ceph/mon:z,rshared +# args: +# - -f +# - --default-mon-cluster-log-to-file=false +# - --default-mon-cluster-log-to-stderr=true +# - -i={{ monitor_name }} +# - --mon-data=/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }} +# - --public-addr={{ _current_monitor_address }} +# - --mon-initial-members={{ groups[mon_group_name] | join(',') }} ########### diff --git a/group_vars/osds.yml.sample b/group_vars/osds.yml.sample index 2238716f3..430318d0e 100644 --- a/group_vars/osds.yml.sample +++ b/group_vars/osds.yml.sample @@ -168,7 +168,6 @@ dummy: # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_osd_docker_extra_env' variable. #ceph_osd_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" #ceph_osd_docker_cpu_limit: 4 @@ -189,9 +188,22 @@ dummy: # ACTIVATE DEVICE # -#ceph_osd_docker_extra_env: #ceph_osd_numactl_opts: "" +# If you want to add parameters, you should retain the existing ones and include the new ones. +#ceph_osd_container_params: +# volumes: +# - /dev:/dev +# - /var/lib/ceph/bootstrap-osd/ceph.keyring:/var/lib/ceph/bootstrap-osd/ceph.keyring:z +# - /var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":/var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":z +# - /var/run/udev/:/var/run/udev/ +# - /run/lvm/:/run/lvm/ +# envs: +# OSD_ID: ${OSD_ID} +# args: +# - -f +# - -i=${OSD_ID} + ########### # SYSTEMD # ########### diff --git a/group_vars/rgws.yml.sample b/group_vars/rgws.yml.sample index 885f40c87..76e57a6e9 100644 --- a/group_vars/rgws.yml.sample +++ b/group_vars/rgws.yml.sample @@ -78,15 +78,21 @@ dummy: # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_rgw_docker_extra_env' variable. #ceph_rgw_docker_memory_limit: "4096m" #ceph_rgw_docker_cpu_limit: 8 # ceph_rgw_docker_cpuset_cpus: "0,2,4,6,8,10,12,14,16" # ceph_rgw_docker_cpuset_mems: "0" -#ceph_rgw_docker_extra_env: #ceph_config_keys: [] # DON'T TOUCH ME #rgw_config_keys: "/" # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +#ceph_rgw_container_params: +# volumes: +# - /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:z +# args: +# - -f +# - -n=client.rgw.{{ ansible_facts['hostname'] }}.${INST_NAME} +# - -k=/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}/keyring ########### # SYSTEMD # diff --git a/roles/ceph-mds/defaults/main.yml b/roles/ceph-mds/defaults/main.yml index cd1342f85..0e49d089e 100644 --- a/roles/ceph-mds/defaults/main.yml +++ b/roles/ceph-mds/defaults/main.yml @@ -22,11 +22,15 @@ copy_admin_key: false ceph_mds_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" ceph_mds_docker_cpu_limit: 4 -# we currently for MDS_NAME to hostname because of a bug in ceph-docker -# fix here: https://github.com/ceph/ceph-docker/pull/770 -# this will go away soon. -ceph_mds_docker_extra_env: -e MDS_NAME={{ ansible_facts['hostname'] }} ceph_config_keys: [] # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +ceph_mds_container_params: + volumes: + - /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z + - /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z + args: + - -f + - -i={{ ansible_facts['hostname'] }} ########### diff --git a/roles/ceph-mds/templates/ceph-mds.service.j2 b/roles/ceph-mds/templates/ceph-mds.service.j2 index 9f56ec61b..91661e1cc 100644 --- a/roles/ceph-mds/templates/ceph-mds.service.j2 +++ b/roles/ceph-mds/templates/ceph-mds.service.j2 @@ -28,22 +28,16 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ --security-opt label=disable \ --memory={{ ceph_mds_docker_memory_limit }} \ --cpus={{ cpu_limit }} \ - -v /var/lib/ceph/bootstrap-mds:/var/lib/ceph/bootstrap-mds:z \ - -v /var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:/var/lib/ceph/mds/{{ cluster }}-{{ ansible_facts['hostname'] }}:z \ -{% for v in ceph_common_container_params['volumes'] %} +{% for v in ceph_common_container_params['volumes'] + ceph_mds_container_params['volumes'] | default([]) %} -v {{ v }} \ {% endfor %} -{% for k, v in ceph_common_container_params['envs'].items() %} +{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_mds_container_params['envs'] | default({}))).items() %} -e {{ k }}={{ v }} \ {% endfor %} - {{ ceph_mds_docker_extra_env }} \ --name=ceph-mds-{{ ansible_facts['hostname'] }} \ --entrypoint=/usr/bin/ceph-mds \ {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ -{% for arg in ceph_common_container_params['args'] %} - {{ arg }} \ -{% endfor %} - -f -i {{ ansible_facts['hostname'] }} + {{ (ceph_common_container_params['args'] + ceph_mds_container_params['args'] | default([])) | join(' ') }} {% if container_binary == 'podman' %} ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`" {% else %} diff --git a/roles/ceph-mgr/defaults/main.yml b/roles/ceph-mgr/defaults/main.yml index cd58ef816..731b7e058 100644 --- a/roles/ceph-mgr/defaults/main.yml +++ b/roles/ceph-mgr/defaults/main.yml @@ -32,12 +32,18 @@ ceph_mgr_packages: # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_mgr_docker_extra_env' variable. ceph_mgr_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" ceph_mgr_docker_cpu_limit: 1 -ceph_mgr_docker_extra_env: ceph_config_keys: [] # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +ceph_mgr_container_params: + volumes: + - /var/lib/ceph/mgr:/var/lib/ceph/mgr:z,rshared + - /var/lib/ceph/bootstrap-mgr:/var/lib/ceph/bootstrap-mgr:z + args: + - -f + - -i={{ ansible_facts['hostname'] }} ########### diff --git a/roles/ceph-mgr/templates/ceph-mgr.service.j2 b/roles/ceph-mgr/templates/ceph-mgr.service.j2 index fe614b216..f8fac566e 100644 --- a/roles/ceph-mgr/templates/ceph-mgr.service.j2 +++ b/roles/ceph-mgr/templates/ceph-mgr.service.j2 @@ -27,23 +27,16 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ --security-opt label=disable \ --memory={{ ceph_mgr_docker_memory_limit }} \ --cpus={{ ceph_mgr_docker_cpu_limit }} \ -{% for v in ceph_common_container_params['volumes'] %} +{% for v in ceph_common_container_params['volumes'] + ceph_mgr_container_params['volumes'] | default([]) %} -v {{ v }} \ {% endfor %} - -v /var/lib/ceph/mgr:/var/lib/ceph/mgr:z,rshared \ - -v /var/lib/ceph/bootstrap-mgr:/var/lib/ceph/bootstrap-mgr:z \ -{% for k, v in ceph_common_container_params['envs'].items() %} +{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_mgr_container_params['envs'] | default({}))).items() %} -e {{ k }}={{ v }} \ {% endfor %} - {{ ceph_mgr_docker_extra_env }} \ --name=ceph-mgr-{{ ansible_facts['hostname'] }} \ --entrypoint=/usr/bin/ceph-mgr \ {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ -{% for arg in ceph_common_container_params['args'] %} - {{ arg }} \ -{% endfor %} - -f \ - -i {{ ansible_facts['hostname'] }} + {{ (ceph_common_container_params['args'] + ceph_mgr_container_params['args'] | default([])) | join(' ') }} {% if container_binary == 'podman' %} ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`" {% else %} diff --git a/roles/ceph-mon/defaults/main.yml b/roles/ceph-mon/defaults/main.yml index 66638bda0..74c779d9c 100644 --- a/roles/ceph-mon/defaults/main.yml +++ b/roles/ceph-mon/defaults/main.yml @@ -36,18 +36,26 @@ client_admin_ceph_authtool_cap: # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_mon_docker_extra_env' variable. ceph_mon_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" ceph_mon_docker_cpu_limit: 1 ceph_mon_container_listen_port: 3300 -# Use this variable to add extra env configuration to run your mon container. -# If you want to set a custom admin keyring you can set this variable like following: -# ceph_mon_docker_extra_env: -e ADMIN_SECRET={{ admin_secret }} -ceph_mon_docker_extra_env: +# Use this variable to modify the configuration to run your mon container. mon_docker_privileged: false mon_docker_net_host: true ceph_config_keys: [] # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +ceph_mon_container_params: + volumes: + - /var/lib/ceph/mon:/var/lib/ceph/mon:z,rshared + args: + - -f + - --default-mon-cluster-log-to-file=false + - --default-mon-cluster-log-to-stderr=true + - -i={{ monitor_name }} + - --mon-data=/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }} + - --public-addr={{ _current_monitor_address }} + - --mon-initial-members={{ groups[mon_group_name] | join(',') }} ########### diff --git a/roles/ceph-mon/templates/ceph-mon.service.j2 b/roles/ceph-mon/templates/ceph-mon.service.j2 index 7dc0e5cb7..0f29470bc 100644 --- a/roles/ceph-mon/templates/ceph-mon.service.j2 +++ b/roles/ceph-mon/templates/ceph-mon.service.j2 @@ -28,10 +28,9 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \ --memory={{ ceph_mon_docker_memory_limit }} \ --cpus={{ ceph_mon_docker_cpu_limit }} \ --security-opt label=disable \ -{% for v in ceph_common_container_params['volumes'] %} +{% for v in ceph_common_container_params['volumes'] + ceph_mon_container_params['volumes'] | default([]) %} -v {{ v }} \ {% endfor %} - -v /var/lib/ceph/mon:/var/lib/ceph/mon:z,rshared \ {% if ansible_facts['os_family'] == 'RedHat' -%} -v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted \ {% endif -%} @@ -41,19 +40,12 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name ceph-mon-%i \ {% if mon_docker_net_host | bool -%} --net=host \ {% endif -%} -{% for k, v in ceph_common_container_params['envs'].items() %} +{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_mon_container_params['envs'] | default({}))).items() %} -e {{ k }}={{ v }} \ {% endfor %} - {{ ceph_mon_docker_extra_env }} \ --entrypoint=/usr/bin/ceph-mon \ - {{ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ -{% for arg in ceph_common_container_params['args'] %} - {{ arg }} \ -{% endfor %} - -f \ - --default-mon-cluster-log-to-file=false --default-mon-cluster-log-to-stderr=true \ - -i {{ monitor_name }} --mon-data /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }} \ - --public-addr {{ _current_monitor_address }} --mon-initial-members {{ groups[mon_group_name] | join(',') }} + {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ + {{ (ceph_common_container_params['args'] + ceph_mon_container_params['args'] | default([])) | join(' ') }} {% if container_binary == 'podman' %} ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`" {% else %} diff --git a/roles/ceph-osd/defaults/main.yml b/roles/ceph-osd/defaults/main.yml index 5e86c6186..99019ee50 100644 --- a/roles/ceph-osd/defaults/main.yml +++ b/roles/ceph-osd/defaults/main.yml @@ -160,7 +160,6 @@ ceph_config_keys: [] # DON'T TOUCH ME # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_osd_docker_extra_env' variable. ceph_osd_docker_memory_limit: "{{ ansible_facts['memtotal_mb'] }}m" ceph_osd_docker_cpu_limit: 4 @@ -181,9 +180,22 @@ ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }} # ACTIVATE DEVICE # -ceph_osd_docker_extra_env: ceph_osd_numactl_opts: "" +# If you want to add parameters, you should retain the existing ones and include the new ones. +ceph_osd_container_params: + volumes: + - /dev:/dev + - /var/lib/ceph/bootstrap-osd/ceph.keyring:/var/lib/ceph/bootstrap-osd/ceph.keyring:z + - /var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":/var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":z + - /var/run/udev/:/var/run/udev/ + - /run/lvm/:/run/lvm/ + envs: + OSD_ID: ${OSD_ID} + args: + - -f + - -i=${OSD_ID} + ########### # SYSTEMD # ########### diff --git a/roles/ceph-osd/templates/systemd-run.j2 b/roles/ceph-osd/templates/systemd-run.j2 index 73ba1b556..0dcaf7931 100644 --- a/roles/ceph-osd/templates/systemd-run.j2 +++ b/roles/ceph-osd/templates/systemd-run.j2 @@ -43,26 +43,16 @@ numactl \ {% if ceph_osd_docker_cpuset_mems is defined -%} --cpuset-mems='{{ ceph_osd_docker_cpuset_mems }}' \ {% endif -%} -{% for v in ceph_common_container_params['volumes'] %} +{% for v in ceph_common_container_params['volumes'] + ceph_osd_container_params['volumes'] | default([]) %} -v {{ v }} \ {% endfor %} --v /dev:/dev \ --v /var/lib/ceph/bootstrap-osd/ceph.keyring:/var/lib/ceph/bootstrap-osd/ceph.keyring:z \ --v /var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":/var/lib/ceph/osd/{{ cluster }}-"${OSD_ID}":z \ --v /var/run/udev/:/var/run/udev/ \ {% if ansible_facts['distribution'] == 'Ubuntu' -%} ---security-opt apparmor:unconfined \ +--security-opt apparmor=unconfined \ {% endif -%} -{% for k, v in ceph_common_container_params['envs'].items() %} +{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_osd_container_params['envs'] | default({}))).items() %} -e {{ k }}={{ v }} \ {% endfor %} --v /run/lvm/:/run/lvm/ \ --e OSD_ID=${OSD_ID} \ --name=ceph-osd-${OSD_ID} \ --entrypoint=/usr/bin/ceph-osd \ -{{ ceph_osd_docker_extra_env }} \ {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ -{% for arg in ceph_common_container_params['args'] %} - {{ arg }} \ -{% endfor %} --f -i ${OSD_ID} +{{ (ceph_common_container_params['args'] + ceph_osd_container_params['args'] | default([])) | join(' ') }} diff --git a/roles/ceph-rgw/defaults/main.yml b/roles/ceph-rgw/defaults/main.yml index ac1eed2f6..c53edd5c9 100644 --- a/roles/ceph-rgw/defaults/main.yml +++ b/roles/ceph-rgw/defaults/main.yml @@ -70,15 +70,21 @@ copy_admin_key: false # Resource limitation # For the whole list of limits you can apply see: docs.docker.com/engine/admin/resource_constraints # Default values are based from: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/2/html/red_hat_ceph_storage_hardware_guide/minimum_recommendations -# These options can be passed using the 'ceph_rgw_docker_extra_env' variable. ceph_rgw_docker_memory_limit: "4096m" ceph_rgw_docker_cpu_limit: 8 # ceph_rgw_docker_cpuset_cpus: "0,2,4,6,8,10,12,14,16" # ceph_rgw_docker_cpuset_mems: "0" -ceph_rgw_docker_extra_env: ceph_config_keys: [] # DON'T TOUCH ME rgw_config_keys: "/" # DON'T TOUCH ME +# If you want to add parameters, you should retain the existing ones and include the new ones. +ceph_rgw_container_params: + volumes: + - /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:z + args: + - -f + - -n=client.rgw.{{ ansible_facts['hostname'] }}.${INST_NAME} + - -k=/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}/keyring ########### # SYSTEMD # diff --git a/roles/ceph-rgw/templates/ceph-radosgw.service.j2 b/roles/ceph-rgw/templates/ceph-radosgw.service.j2 index add58124b..524817653 100644 --- a/roles/ceph-rgw/templates/ceph-radosgw.service.j2 +++ b/roles/ceph-rgw/templates/ceph-radosgw.service.j2 @@ -34,28 +34,22 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \ {% if ceph_rgw_docker_cpuset_mems is defined -%} --cpuset-mems="{{ ceph_rgw_docker_cpuset_mems }}" \ {% endif -%} -{% for v in ceph_common_container_params['volumes'] %} +{% for v in ceph_common_container_params['volumes'] + ceph_rgw_container_params['volumes'] | default([]) %} -v {{ v }} \ {% endfor %} - -v /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:/var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}:z \ -{% for k, v in ceph_common_container_params['envs'].items() %} +{% for k, v in (ceph_common_container_params['envs'] | combine(ceph_rgw_container_params['envs'] | default({}))).items() %} -e {{ k }}={{ v }} \ {% endfor %} - {% if ansible_facts['os_family'] == 'RedHat' -%} +{% if ansible_facts['os_family'] == 'RedHat' -%} -v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted \ - {% endif -%} - {% if radosgw_frontend_ssl_certificate -%} +{% endif -%} +{% if radosgw_frontend_ssl_certificate -%} -v {{ radosgw_frontend_ssl_certificate }}:{{ radosgw_frontend_ssl_certificate }} \ - {% endif -%} - -e TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES={{ ceph_tcmalloc_max_total_thread_cache }} \ +{% endif -%} --name=ceph-rgw-{{ ansible_facts['hostname'] }}-${INST_NAME} \ --entrypoint=/usr/bin/radosgw \ - {{ ceph_rgw_docker_extra_env }} \ {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} \ -{% for arg in ceph_common_container_params['args'] %} - {{ arg }} \ -{% endfor %} - -f -n client.rgw.{{ ansible_facts['hostname'] }}.${INST_NAME} -k /var/lib/ceph/radosgw/{{ cluster }}-rgw.{{ ansible_facts['hostname'] }}.${INST_NAME}/keyring + {{ (ceph_common_container_params['args'] + ceph_rgw_container_params['args'] | default([])) | join(' ') }} {% if container_binary == 'podman' %} ExecStop=-/usr/bin/sh -c "/usr/bin/{{ container_binary }} rm -f `cat /%t/%n-cid`" {% else %}