From e522ab0fe71b8a2104ef4372d9652ed944af51bf Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Mon, 27 Jan 2020 17:48:48 -0600 Subject: [PATCH] Disable inspection power-off This will enable inspection scenarios to operate the fast track behavior. Change-Id: I4596bfb1d2c6fab47e501dc1a5f013877a3c3b87 --- playbooks/roles/bifrost-ironic-install/README.md | 7 +++++++ .../roles/bifrost-ironic-install/defaults/main.yml | 5 +++++ .../templates/ironic-inspector.conf.j2 | 1 + .../bifrost-ironic-install/templates/ironic.conf.j2 | 1 + ...pector-no-longer-powers-off-796801e809184eee.yaml | 12 ++++++++++++ 5 files changed, 26 insertions(+) create mode 100644 releasenotes/notes/inspector-no-longer-powers-off-796801e809184eee.yaml diff --git a/playbooks/roles/bifrost-ironic-install/README.md b/playbooks/roles/bifrost-ironic-install/README.md index 09061f841..277c33145 100644 --- a/playbooks/roles/bifrost-ironic-install/README.md +++ b/playbooks/roles/bifrost-ironic-install/README.md @@ -164,6 +164,13 @@ fast_track: Boolean setting to enable ironic to leverage an already running agent on the host being deployed such that deployment can begin immediately as opposed to waiting for a complete system reboot. +power_off_after_inspection: Boolean setting governing the behavior + of ironic-inspector's processing. + The default is to not power-off machines + effectively enabling the Inspection to + Deployment without the need to reboot + the physical machine. + ### Hardware Inspection Support Bifrost also supports the installation of ironic-inspector in standalone diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index f5539f8f6..d6c3d89a0 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -213,6 +213,11 @@ inspector: enabled: "{{ enable_inspector_discovery | default(true) }}" default_node_driver: "{{ inspector_default_node_driver | default('ipmi')}}" +# 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. +power_off_after_inspection: false + # We may not have packaged iPXE files on some distros, or may want to # download them on their own. download_ipxe: false 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 0cde31c4f..c46d1788d 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 @@ -71,6 +71,7 @@ store_data = database {% endif %} {% if inspector.discovery.enabled == true %} node_not_found_hook = enroll +power_off = {{ power_off_after_inspection }} [discovery] enroll_node_driver = {{ inspector.discovery.default_node_driver }} diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 index b1b686ec9..2eff11b7a 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic.conf.j2 @@ -85,6 +85,7 @@ use_web_server_for_images = true {% if enable_inspector | bool == true %} [inspector] +power_off = {{ power_off_after_inspection }} extra_kernel_params = {{ inspector_extra_kernel_options | default('') }} {% if enable_keystone is defined and enable_keystone | bool == true %} auth_type = password diff --git a/releasenotes/notes/inspector-no-longer-powers-off-796801e809184eee.yaml b/releasenotes/notes/inspector-no-longer-powers-off-796801e809184eee.yaml new file mode 100644 index 000000000..16f16c4e3 --- /dev/null +++ b/releasenotes/notes/inspector-no-longer-powers-off-796801e809184eee.yaml @@ -0,0 +1,12 @@ +--- +features: + - | + The default operating mode of bifrost now no longer powers off nodes + once they have been inspected. This leaves the ironic-python-agent + running and ultimately allows moving into deployment skipping a full + boot sequence when following the typical use path. + + This setting may be disabled and the previous behavior reverted by + changing the ``power_off_after_inspection`` setting to ``true``. + This setting maps to ironic-inspector.conf's ``[processing]power_off`` + and ironic.conf's ``[inspector]power_off`` settings.