From db15a8012374d63fdae5b5b28729071a767442e8 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 22 Jun 2020 12:24:00 +0200 Subject: [PATCH] Allow to customise hardware inspection timeouts Change-Id: I2e45876f89121d66cf03b50824bd8258517b88cb Story: 2007844 Task: 40135 --- ansible/baremetal-compute-inspect.yml | 2 +- ansible/group_vars/all/bifrost | 4 ++++ ansible/group_vars/all/inspector | 7 +++++++ ansible/overcloud-hardware-inspect.yml | 2 +- doc/source/configuration/bifrost.rst | 4 ++++ etc/kayobe/bifrost.yml | 4 ++++ etc/kayobe/inspector.yml | 7 +++++++ ...ware-inspection-timeouts-777f3bb569929f0f.yaml | 15 +++++++++++++++ 8 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/hardware-inspection-timeouts-777f3bb569929f0f.yaml diff --git a/ansible/baremetal-compute-inspect.yml b/ansible/baremetal-compute-inspect.yml index f6319c820..d66061ced 100644 --- a/ansible/baremetal-compute-inspect.yml +++ b/ansible/baremetal-compute-inspect.yml @@ -29,7 +29,7 @@ baremetal_compute_wait: True # Time to wait for state transition to complete, if baremetal_compute_wait # is True. - baremetal_compute_timeout: 1200 + baremetal_compute_timeout: "{{ inspector_inspection_timeout }}" tasks: - name: Ensure baremetal compute nodes are inspected in ironic os_ironic_inspect: diff --git a/ansible/group_vars/all/bifrost b/ansible/group_vars/all/bifrost index 56f89e3b9..4e17df455 100644 --- a/ansible/group_vars/all/bifrost +++ b/ansible/group_vars/all/bifrost @@ -87,6 +87,10 @@ kolla_bifrost_inspector_deploy_kernel: "http://{{ provision_oc_net_name | net_ip # Ironic inspector deployment ramdisk location. kolla_bifrost_inspector_deploy_ramdisk: "http://{{ provision_oc_net_name | net_ip }}:8080/ipa.initramfs" +# Timeout of hardware inspection on overcloud nodes, in seconds. Default is +# {{ inspector_inspection_timeout }}. +kolla_bifrost_inspection_timeout: "{{ inspector_inspection_timeout }}" + ############################################################################### # Ironic Python Agent (IPA) configuration. diff --git a/ansible/group_vars/all/inspector b/ansible/group_vars/all/inspector index b51f8eb4b..1c28d8a97 100644 --- a/ansible/group_vars/all/inspector +++ b/ansible/group_vars/all/inspector @@ -1,4 +1,11 @@ --- +############################################################################### +# General configuration of inspection. + +# Timeout of hardware inspection on baremetal compute nodes, in seconds. +# Default is 1200. +inspector_inspection_timeout: 1200 + ############################################################################### # Ironic inspector PXE configuration. diff --git a/ansible/overcloud-hardware-inspect.yml b/ansible/overcloud-hardware-inspect.yml index 869309838..aa6c22a8f 100644 --- a/ansible/overcloud-hardware-inspect.yml +++ b/ansible/overcloud-hardware-inspect.yml @@ -8,7 +8,7 @@ vars: # Set to False to avoid waiting for the nodes to become active. wait_inspected: True - wait_inspected_timeout: 600 + wait_inspected_timeout: "{{ kolla_bifrost_inspection_timeout }}" wait_inspected_interval: 10 # List of states from which we can get to inspecting. inspectable_states: diff --git a/doc/source/configuration/bifrost.rst b/doc/source/configuration/bifrost.rst index 98c5cc7f4..b26098e6e 100644 --- a/doc/source/configuration/bifrost.rst +++ b/doc/source/configuration/bifrost.rst @@ -227,6 +227,10 @@ The following options configure the Ironic Inspector service in the ``kolla_bifrost_inspector_deploy_ramdisk`` Ironic inspector deployment ramdisk location. Default is ``http://{{ provision_oc_net_name | net_ip }}:8080/ipa.initramfs``. +``kolla_bifrost_inspection_timeout`` + Timeout of hardware inspection on overcloud nodes, in seconds. Default is + ``{{ inspector_inspection_timeout }}``, defined in + ``${KAYOBE_CONFIG_PATH}/inspector.yml``. Ironic Python Agent (IPA) configuration ======================================= diff --git a/etc/kayobe/bifrost.yml b/etc/kayobe/bifrost.yml index 61710b5e4..b14f8d306 100644 --- a/etc/kayobe/bifrost.yml +++ b/etc/kayobe/bifrost.yml @@ -86,6 +86,10 @@ # Ironic inspector deployment ramdisk location. #kolla_bifrost_inspector_deploy_ramdisk: +# Timeout of hardware inspection on overcloud nodes, in seconds. Default is +# {{ inspector_inspection_timeout }}. +#kolla_bifrost_inspection_timeout: + ############################################################################### # Ironic Python Agent (IPA) configuration. diff --git a/etc/kayobe/inspector.yml b/etc/kayobe/inspector.yml index b99780e30..9e5f05414 100644 --- a/etc/kayobe/inspector.yml +++ b/etc/kayobe/inspector.yml @@ -1,4 +1,11 @@ --- +############################################################################### +# General configuration of inspection. + +# Timeout of hardware inspection on baremetal compute nodes, in seconds. +# Default is 1200. +#inspector_inspection_timeout: + ############################################################################### # Ironic inspector PXE configuration. diff --git a/releasenotes/notes/hardware-inspection-timeouts-777f3bb569929f0f.yaml b/releasenotes/notes/hardware-inspection-timeouts-777f3bb569929f0f.yaml new file mode 100644 index 000000000..d982465ff --- /dev/null +++ b/releasenotes/notes/hardware-inspection-timeouts-777f3bb569929f0f.yaml @@ -0,0 +1,15 @@ +--- +features: + - | + Adds two new configuration variables, ``kolla_bifrost_inspection_timeout`` + and ``inspector_inspection_timeout``, which allow to customise timeouts of + hardware inspection (in seconds) respectively for overcloud nodes and + baremetal compute nodes. ``inspector_inspection_timeout`` defaults to + ``1200`` and ``kolla_bifrost_inspection_timeout`` defaults to the value of + ``inspector_inspection_timeout``. See `story 2007844 + `__ for details. +upgrade: + - | + The default timeout for the overcloud hardware inspection operation is + increased from 10 minutes to 20 minutes, to avoid issues when using the + ``extra-hardware`` collector on hardware booting slowly.