Skip to content
Snippets Groups Projects
Commit 44af7048 authored by Pierre Riteau's avatar Pierre Riteau
Browse files

Add introspection rule to update deploy kernel location

Back in the Ussuri release, we changed the Bifrost kernel location to
use ipa.kernel instead of ipa.vmlinuz. While this works fine for newly
discovered nodes, any node added to Bifrost in Train or earlier will
have kept ipa.vmlinuz as its deploy kernel.

This can cause issues since upgrading Bifrost or building new deployment
images will update ipa.kernel, but not ipa.vmlinuz, resulting in nodes
booting with an old kernel and a new ramdisk.

Fix by adding a new rule updating the legacy kernel location and
documenting how to update node information.

Change-Id: I6ae44dcae78424b4638762d015cf24336444707f
parent 990370a3
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ kolla_bifrost_inspector_port_addition: "{{ inspector_add_ports }}" ...@@ -99,7 +99,7 @@ kolla_bifrost_inspector_port_addition: "{{ inspector_add_ports }}"
kolla_bifrost_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}" kolla_bifrost_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}"
# List of introspection rules for Bifrost's Ironic Inspector service. # List of introspection rules for Bifrost's Ironic Inspector service.
kolla_bifrost_inspector_rules: "{{ inspector_rules }}" kolla_bifrost_inspector_rules: "{{ inspector_rules + [inspector_rule_legacy_deploy_kernel] }}"
# Ironic inspector IPMI username to set. # Ironic inspector IPMI username to set.
kolla_bifrost_inspector_ipmi_username: "{{ ipmi_username }}" kolla_bifrost_inspector_ipmi_username: "{{ ipmi_username }}"
...@@ -117,6 +117,9 @@ kolla_bifrost_inspector_deploy_kernel: "http://{{ provision_oc_net_name | net_ip ...@@ -117,6 +117,9 @@ kolla_bifrost_inspector_deploy_kernel: "http://{{ provision_oc_net_name | net_ip
# Ironic inspector deployment ramdisk location. # Ironic inspector deployment ramdisk location.
kolla_bifrost_inspector_deploy_ramdisk: "http://{{ provision_oc_net_name | net_ip }}:8080/ipa.initramfs" kolla_bifrost_inspector_deploy_ramdisk: "http://{{ provision_oc_net_name | net_ip }}:8080/ipa.initramfs"
# Ironic inspector legacy deployment kernel location.
kolla_bifrost_inspector_legacy_deploy_kernel: "http://{{ provision_oc_net_name | net_ip }}:8080/ipa.vmlinuz"
# Timeout of hardware inspection on overcloud nodes, in seconds. Default is # Timeout of hardware inspection on overcloud nodes, in seconds. Default is
# {{ inspector_inspection_timeout }}. # {{ inspector_inspection_timeout }}.
kolla_bifrost_inspection_timeout: "{{ inspector_inspection_timeout }}" kolla_bifrost_inspection_timeout: "{{ inspector_inspection_timeout }}"
......
...@@ -119,6 +119,18 @@ inspector_rule_deploy_kernel: ...@@ -119,6 +119,18 @@ inspector_rule_deploy_kernel:
path: "driver_info/deploy_kernel" path: "driver_info/deploy_kernel"
value: "{{ inspector_rule_var_deploy_kernel }}" value: "{{ inspector_rule_var_deploy_kernel }}"
# Ironic inspector rule to update deployment kernel from legacy location.
inspector_rule_legacy_deploy_kernel:
description: "Update deploy kernel from legacy"
conditions:
- field: "node://driver_info.deploy_kernel"
op: "eq"
value: "{{ inspector_rule_var_legacy_deploy_kernel }}"
actions:
- action: "set-attribute"
path: "driver_info/deploy_kernel"
value: "{{ inspector_rule_var_deploy_kernel }}"
# Deployment ramdisk referenced by inspector rule. # Deployment ramdisk referenced by inspector rule.
inspector_rule_var_deploy_ramdisk: inspector_rule_var_deploy_ramdisk:
......
...@@ -17,3 +17,4 @@ ...@@ -17,3 +17,4 @@
inspector_rule_var_lldp_switch_port_interface: "{{ kolla_bifrost_inspector_lldp_switch_port_interface }}" inspector_rule_var_lldp_switch_port_interface: "{{ kolla_bifrost_inspector_lldp_switch_port_interface }}"
inspector_rule_var_deploy_kernel: "{{ kolla_bifrost_inspector_deploy_kernel }}" inspector_rule_var_deploy_kernel: "{{ kolla_bifrost_inspector_deploy_kernel }}"
inspector_rule_var_deploy_ramdisk: "{{ kolla_bifrost_inspector_deploy_ramdisk }}" inspector_rule_var_deploy_ramdisk: "{{ kolla_bifrost_inspector_deploy_ramdisk }}"
inspector_rule_var_legacy_deploy_kernel: "{{ kolla_bifrost_inspector_legacy_deploy_kernel }}"
...@@ -116,6 +116,9 @@ ...@@ -116,6 +116,9 @@
# Ironic inspector deployment ramdisk location. # Ironic inspector deployment ramdisk location.
#kolla_bifrost_inspector_deploy_ramdisk: #kolla_bifrost_inspector_deploy_ramdisk:
# Ironic inspector legacy deployment kernel location.
#kolla_bifrost_inspector_legacy_deploy_kernel:
# Timeout of hardware inspection on overcloud nodes, in seconds. Default is # Timeout of hardware inspection on overcloud nodes, in seconds. Default is
# {{ inspector_inspection_timeout }}. # {{ inspector_inspection_timeout }}.
#kolla_bifrost_inspection_timeout: #kolla_bifrost_inspection_timeout:
......
---
upgrade:
- |
Adds an introspection rule to update the location of the deployment kernel
registered in existing Ironic nodes. Nodes discovered on a deployment
running the Train release or earlier may still be using the ``ipa.vmlinuz``
kernel, which stays unchanged when deployment images get updated. If only
default introspection rules are in use, existing nodes may be updated from
the Bifrost container with the following command:
``OS_CLOUD=bifrost baremetal introspection reprocess $NODE_UUID_OR_NAME``
If non-default rules are used, reprocessing may revert any customisation
done by the operator. In this case, a more cautious approach is to update
the deployment kernel location manually:
``OS_CLOUD=bifrost baremetal node set --driver-info deploy_kernel=<http://url/to/ipa.kernel> $NODE_UUID_OR_NAME``
If the ``kolla_bifrost_inspector_rules`` list is customised, the rule
``inspector_rule_legacy_deploy_kernel`` should be added to it.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment