14bf524756
This commit is to apply resource-constraints to a few more OpenStack services. Commit to apply constraints to the last set of services will be made in the upcoming commit. Depends-on: Icafa54baca24d2de64238222a5677b9d8b90e2aa Change-Id: I39004f54281f97d53dfa4b1dbcf248650ad6f186
147 lines
6.2 KiB
YAML
147 lines
6.2 KiB
YAML
---
|
|
- name: Restart ironic-conductor container
|
|
vars:
|
|
service_name: "ironic-conductor"
|
|
service: "{{ ironic_services[service_name] }}"
|
|
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_conf: "{{ ironic_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ ironic_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_conductor_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or ironic_conf.changed | bool
|
|
or policy_json.changed | bool
|
|
or ironic_conductor_container.changed | bool
|
|
|
|
- name: Restart ironic-api container
|
|
vars:
|
|
service_name: "ironic-api"
|
|
service: "{{ ironic_services[service_name] }}"
|
|
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_conf: "{{ ironic_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ ironic_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_api_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or ironic_conf.changed | bool
|
|
or policy_json.changed | bool
|
|
or ironic_api_container.changed | bool
|
|
|
|
- name: Restart ironic-inspector container
|
|
vars:
|
|
service_name: "ironic-inspector"
|
|
service: "{{ ironic_services[service_name] }}"
|
|
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ ironic_policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_inspector_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
volumes: "{{ service.volumes|reject('equalto', '')|list }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or ironic_inspector_confs.changed | bool
|
|
or policy_json.changed | bool
|
|
or ironic_inspector_container.changed | bool
|
|
|
|
- name: Restart ironic-pxe container
|
|
vars:
|
|
service_name: "ironic-pxe"
|
|
service: "{{ ironic_services[service_name] }}"
|
|
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_pxe_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or ironic_pxe_confs.changed | bool
|
|
or ironic_pxe_uefi_confs.changed | bool
|
|
or ironic_kernel.changed | bool
|
|
or ironic_pxe_container.changed | bool
|
|
|
|
- name: Restart ironic-ipxe container
|
|
vars:
|
|
service_name: "ironic-ipxe"
|
|
service: "{{ ironic_services[service_name] }}"
|
|
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_ipxe_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or ironic_ipxe_inspector_boot_script.changed | bool
|
|
or ironic_ipxe_apache_confs.changed | bool
|
|
or ironic_kernel_ipxe.changed | bool
|
|
or ironic_ipxe_container.changed | bool
|
|
|
|
- name: Restart ironic-dnsmasq container
|
|
vars:
|
|
service_name: "ironic-dnsmasq"
|
|
service: "{{ ironic_services[service_name] }}"
|
|
config_json: "{{ ironic_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
ironic_dnsmasq_container: "{{ check_ironic_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
cap_add: "{{ service.cap_add }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname in groups[service.group]
|
|
- service.enabled | bool
|
|
- config_json.changed | bool
|
|
or ironic_dnsmasq_confs.changed | bool
|
|
or ironic_dnsmasq_container.changed | bool
|