From e3ff784da17ae7a0a038287b6218e5338a0bb305 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Tue, 25 Apr 2017 09:30:52 +0100 Subject: [PATCH] Support extra PXE kernel arguments for Inspector As an operator I want to be able to specify additional kernel arguments for nodes being inspected by ironic inspector so that I can pass arguments to Ironic Python Agent (IPA). A number of optional features in IPA are configured via kernel command line arguments, e.g. ipa-collect-lldp. This change allows additional kernel arguments to be provided for use by the IPA ramdisk during inspection. Change-Id: I547596a8108765383f291da690196f3222b59d79 Closes-Bug: #1685876 --- playbooks/roles/bifrost-ironic-install/README.md | 4 ++++ .../roles/bifrost-ironic-install/defaults/main.yml | 4 ++++ .../templates/inspector-default-boot-ipxe.j2 | 2 +- .../notes/inspector-pxe-args-c65acb610507ab08.yaml | 11 +++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/inspector-pxe-args-c65acb610507ab08.yaml diff --git a/playbooks/roles/bifrost-ironic-install/README.md b/playbooks/roles/bifrost-ironic-install/README.md index 8c05fbe0f..3b5b4151c 100644 --- a/playbooks/roles/bifrost-ironic-install/README.md +++ b/playbooks/roles/bifrost-ironic-install/README.md @@ -210,6 +210,10 @@ inspector_default_node_driver: The default driver to utilize when adding setting for their install environment if an alternative default driver is required. +inspector_extra_kernel_options: String value, default undefined. Extra + kernel parameters for the inspector default + PXE configuration. + ### Virtual Environment Install Bifrost can install ironic into a python virtual environment using the diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 8a29affe4..0bccff10a 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -141,6 +141,10 @@ inspector_port_addition: "pxe" # Note: inspector_keep_ports has three valid values: all, present, added inspector_keep_ports: "present" +# String value containing extra kernel parameters for the inspector default +# PXE configuration. +#inspector_extra_kernel_options: + # Inspector defaults inspector: discovery: diff --git a/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 b/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 index 696145398..7541cc7b3 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/inspector-default-boot-ipxe.j2 @@ -5,6 +5,6 @@ dhcp || reboot goto introspect :introspect -kernel {{ ipa_kernel_url }} ipa-inspection-callback-url=http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface ]['ipv4']['address'] }}:5050/v1/continue systemd.journald.forward_to_console=yes ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} nofb nomodeset vga=normal console=ttyS0 +kernel {{ ipa_kernel_url }} ipa-inspection-callback-url=http://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface ]['ipv4']['address'] }}:5050/v1/continue systemd.journald.forward_to_console=yes ip=${ip}:${next-server}:${gateway}:${netmask} BOOTIF=${mac} nofb nomodeset vga=normal console=ttyS0 {{ inspector_extra_kernel_options | default('') }} initrd {{ ipa_ramdisk_url }} boot diff --git a/releasenotes/notes/inspector-pxe-args-c65acb610507ab08.yaml b/releasenotes/notes/inspector-pxe-args-c65acb610507ab08.yaml new file mode 100644 index 000000000..8eb357065 --- /dev/null +++ b/releasenotes/notes/inspector-pxe-args-c65acb610507ab08.yaml @@ -0,0 +1,11 @@ +--- +features: + - | + Allows additional kernel arguments to be specified in inspector PXE config. + + A number of optional features in the Ironic Python Agent (IPA) are + configured via kernel command line arguments, e.g. ``ipa-collect-lldp``. + + It is now possible to specify additional kernel arguments for use by the + IPA ramdisk during inspection with the ``inspector_extra_kernel_options`` + variable.