6c54ce4d3b
This allows us to continue execution until a certain proportion of hosts fail. This can be useful at scale, where failures are common, and restarting a deployment is time-consuming. The default max failure percentage is 100, keeping the default behaviour. A global max failure percentage may be set via kayobe_max_fail_percentage, and individual playbooks may define a max failure percentage via <playbook>_max_fail_percentage. Related Kolla Ansible patch: https://review.opendev.org/c/openstack/kolla-ansible/+/805598 Change-Id: Ib81c72b63be5765cca664c38141ffc769640cf07
47 lines
1.9 KiB
YAML
47 lines
1.9 KiB
YAML
---
|
|
# This playbook will ensure that all baremetal compute nodes in the overcloud
|
|
# ironic inventory are manageable. Supported initial states include 'enroll',
|
|
# 'manageable', and 'available'.
|
|
|
|
# We install openstacksdk in a virtualenv on one of the controllers, and delegate to
|
|
# it when executing the stackhpc.os-ironic-state role.
|
|
|
|
- name: Ensure baremetal compute nodes are manageable in ironic
|
|
hosts: controllers[0]
|
|
gather_facts: true
|
|
vars:
|
|
venv: "{{ virtualenv_path }}/openstacksdk"
|
|
roles:
|
|
- role: stackhpc.openstack.os_openstacksdk
|
|
os_openstacksdk_venv: "{{ venv }}"
|
|
os_openstacksdk_install_epel: "{{ dnf_install_epel }}"
|
|
os_openstacksdk_upper_constraints_file: "{{ openstacksdk_upper_constraints_file }}"
|
|
|
|
- name: Ensure baremetal compute nodes are manageable in ironic
|
|
hosts: baremetal-compute
|
|
gather_facts: False
|
|
max_fail_percentage: >-
|
|
{{ baremetal_compute_manage_max_fail_percentage |
|
|
default(baremetal_compute_max_fail_percentage) |
|
|
default(kayobe_max_fail_percentage) |
|
|
default(100) }}
|
|
vars:
|
|
venv: "{{ virtualenv_path }}/openstacksdk"
|
|
ansible_python_interpreter: "{{ venv }}/bin/python"
|
|
# Whether to wait for the state transition to complete.
|
|
baremetal_compute_wait: True
|
|
# Time to wait for state transition to complete, if baremetal_compute_wait
|
|
# is True.
|
|
baremetal_compute_timeout: 1200
|
|
roles:
|
|
- role: stackhpc.os-ironic-state
|
|
os_ironic_state_auth_type: "{{ openstack_auth_type }}"
|
|
os_ironic_state_auth: "{{ openstack_auth }}"
|
|
os_ironic_state_cacert: "{{ openstack_cacert }}"
|
|
os_ironic_state_interface: "{{ openstack_interface }}"
|
|
os_ironic_state_name: "{{ inventory_hostname }}"
|
|
os_ironic_state_provision_state: "manage"
|
|
os_ironic_state_wait: "{{ baremetal_compute_wait }}"
|
|
os_ironic_state_timeout: "{{ baremetal_compute_timeout }}"
|
|
os_ironic_state_delegate_to: "{{ groups['controllers'][0] }}"
|