ade5bfa302
By default, Ansible injects a variable for every fact, prefixed with ansible_. This can result in a large number of variables for each host, which at scale can incur a performance penalty. Ansible provides a configuration option [0] that can be set to False to prevent this injection of facts. In this case, facts should be referenced via ansible_facts.<fact>. This change updates all references to Ansible facts within Kolla Ansible from using individual fact variables to using the items in the ansible_facts dictionary. This allows users to disable fact variable injection in their Ansible configuration, which may provide some performance improvement. This change disables fact variable injection in the ansible configuration used in CI, to catch any attempts to use the injected variables. [0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars Change-Id: I7e9d5c9b8b9164d4aee3abb4e37c8f28d98ff5d1 Partially-Implements: blueprint performance-improvements
79 lines
2.7 KiB
YAML
79 lines
2.7 KiB
YAML
---
|
|
project_name: "iscsi"
|
|
|
|
iscsi_services:
|
|
iscsid:
|
|
container_name: iscsid
|
|
group: iscsid
|
|
enabled: "{{ enable_iscsid_for_cinder or enable_iscsid_for_ironic }}"
|
|
image: "{{ iscsid_image_full }}"
|
|
ipc_mode: "host"
|
|
privileged: True
|
|
volumes: "{{ iscsid_default_volumes + iscsid_extra_volumes }}"
|
|
dimensions: "{{ iscsid_dimensions }}"
|
|
tgtd:
|
|
container_name: tgtd
|
|
group: tgtd
|
|
enabled: "{{ enable_tgtd }}"
|
|
image: "{{ tgtd_image_full }}"
|
|
ipc_mode: "host"
|
|
privileged: True
|
|
volumes: "{{ tgtd_default_volumes + tgtd_extra_volumes }}"
|
|
dimensions: "{{ tgtd_dimensions }}"
|
|
|
|
|
|
####################
|
|
# Docker
|
|
####################
|
|
iscsi_install_type: "{{ kolla_install_type }}"
|
|
iscsi_tag: "{{ openstack_tag }}"
|
|
|
|
iscsid_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ iscsi_install_type }}-iscsid"
|
|
iscsid_tag: "{{ iscsi_tag }}"
|
|
iscsid_image_full: "{{ iscsid_image }}:{{ iscsid_tag }}"
|
|
|
|
tgtd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ iscsi_install_type }}-tgtd"
|
|
tgtd_tag: "{{ iscsi_tag }}"
|
|
tgtd_image_full: "{{ tgtd_image }}:{{ tgtd_tag }}"
|
|
|
|
iscsid_dimensions: "{{ default_container_dimensions }}"
|
|
tgtd_dimensions: "{{ default_container_dimensions }}"
|
|
|
|
iscsid_default_volumes:
|
|
- "{{ node_config_directory }}/iscsid/:{{ container_config_directory }}/:ro"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "/dev/:/dev/"
|
|
- "/run/:/run/:shared"
|
|
- "/lib/modules:/lib/modules:ro"
|
|
- "/sys/kernel/config:/configfs"
|
|
- "cinder:/var/lib/cinder"
|
|
- "iscsi_info:/etc/iscsi"
|
|
tgtd_default_volumes:
|
|
- "{{ node_config_directory }}/tgtd/:{{ container_config_directory }}/:ro"
|
|
- "kolla_logs:/var/log/kolla/"
|
|
- "/etc/localtime:/etc/localtime:ro"
|
|
- "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
|
|
- "/dev/:/dev/"
|
|
- "/run/:/run/:shared"
|
|
- "/lib/modules:/lib/modules:ro"
|
|
- "/sys/kernel/config:/configfs"
|
|
- "cinder:/var/lib/cinder"
|
|
- "iscsi_info:/etc/iscsi"
|
|
iscsid_extra_volumes: "{{ default_extra_volumes }}"
|
|
tgtd_extra_volumes: "{{ default_extra_volumes }}"
|
|
|
|
enable_iscsid_for_cinder: >-
|
|
{{ (inventory_hostname in groups['compute']
|
|
or inventory_hostname in groups['cinder-backup']
|
|
or inventory_hostname in groups['cinder-volume'])
|
|
and enable_cinder | bool
|
|
and enable_cinder_backend_iscsi | bool }}
|
|
enable_iscsid_for_ironic: >-
|
|
{{ inventory_hostname in groups['ironic-conductor'] and enable_ironic | bool }}
|
|
enable_tgtd: >-
|
|
{{ enable_cinder | bool and
|
|
enable_cinder_backend_lvm | bool and
|
|
cinder_target_helper == "tgtadm" }}
|