From e8f365e0ebe3ff2f82558743c59c11b241048657 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Thu, 25 Jan 2024 12:42:21 +0100 Subject: [PATCH] Wire in node auto-discovery Change-Id: I99ff327e4b8385f8e4ca220331117ab7d5a10418 Depends-On: https://review.opendev.org/c/openstack/ironic/+/906376 --- playbooks/roles/bifrost-ironic-install/defaults/main.yml | 6 ------ .../templates/ironic-inspector.conf.j2 | 4 ++-- .../roles/bifrost-ironic-install/templates/ironic.conf.j2 | 4 ++++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index d7a2d3c8d..d3fa988fd 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -261,12 +261,6 @@ enable_inspector_discovery: false inspector_default_node_driver: "{{ 'manual-management' if enable_credential_less_deploy | bool else 'ipmi' }}" -# Inspector defaults (deprecated in Victoria) -inspector: - discovery: - enabled: "{{ enable_inspector_discovery }}" - default_node_driver: "{{ inspector_default_node_driver }}" - # If baremetal nodes should be turned off after inspection. # The inspector default is to turn off the baremetal node # power, this setting to false enables use of fast track mode. diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 index fcb49c4ac..68642b5f8 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 @@ -88,9 +88,9 @@ processing_hooks = {{ inspector_processing_hooks }} store_data = database power_off = {{ power_off_after_inspection }} -{% if inspector.discovery.enabled | bool %} +{% if enable_inspector_discovery | bool %} node_not_found_hook = enroll [discovery] -enroll_node_driver = {{ inspector.discovery.default_node_driver }} +enroll_node_driver = {{ inspector_default_node_driver }} {% endif %} diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 index 3c0b97d76..6b9dc9067 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 @@ -182,6 +182,10 @@ cafile = {{ tls_certificate_path }} {% endif %} {% endif %} +[auto_discovery] +enabled = {{ enable_inspector_discovery | bool }} +driver = {{ inspector_default_node_driver }} + {% if enable_keystone is defined and enable_keystone | bool == true %} [keystone_authtoken] auth_plugin = password