Skip to content

Commit

Permalink
Add env variable to set IPA kernel params
Browse files Browse the repository at this point in the history
Add IRONIC_KERNEL_PARAMS to set extra kernel params.
Also remove console=ttyS0 as it can now be set with IRONIC_KERNEL_PARAMS
where needed. Having it hardcoded results in Nothing being sent to the
VGA console in real baremetal environments, making it difficult to debug
problems.
  • Loading branch information
derekhiggins committed Dec 1, 2020
1 parent 96b9f1f commit d896f15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ The following environment variables can be passed in to customize run-time funct
- MARIADB_PASSWORD - The database password
- OS_<section>_\_<name>=<value> - This format can be used to set arbitary ironic config options
- IRONIC_RAMDISK_SSH_KEY - A public key to allow ssh access to nodes running IPA, takes the format "ssh-rsa AAAAB3....."
- IRONIC_KERNEL_PARAMS - This parameter can be used to add additional kernel parameters to nodes running IPA

The ironic configuration can be overridden by various environment variables. The following can serve as an example:
- OS_CONDUCTOR__DEPLOY_CALLBACK_TIMEOUT=4800 - timeout (seconds) to wait for a callback from a deploy ramdisk
Expand Down
2 changes: 1 addition & 1 deletion inspector.ipxe.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ echo In inspector.ipxe
imgfree
# NOTE(dtantsur): keep inspection kernel params in [mdns]params in
# ironic-inspector-image and configuration in configure-ironic.sh
kernel --timeout 60000 http://IRONIC_IP:HTTP_PORT/images/ironic-python-agent.kernel console=ttyS0 ipa-insecure=1 ipa-inspection-collectors=default,extra-hardware,logs systemd.journald.forward_to_console=yes BOOTIF=${mac} ipa-debug=1 ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 EXTRA_ARGS initrd=ironic-python-agent.initramfs {% if env.IRONIC_RAMDISK_SSH_KEY %}sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %} || goto retry_boot
kernel --timeout 60000 http://IRONIC_IP:HTTP_PORT/images/ironic-python-agent.kernel ipa-insecure=1 ipa-inspection-collectors=default,extra-hardware,logs systemd.journald.forward_to_console=yes BOOTIF=${mac} ipa-debug=1 ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 EXTRA_ARGS initrd=ironic-python-agent.initramfs {% if env.IRONIC_RAMDISK_SSH_KEY %}sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %} {{ env.IRONIC_KERNEL_PARAMS|trim }} || goto retry_boot
initrd --timeout 60000 http://IRONIC_IP:HTTP_PORT/images/ironic-python-agent.initramfs || goto retry_boot
boot
6 changes: 3 additions & 3 deletions ironic.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ cafile = {{ env.IRONIC_INSPECTOR_CACERT_FILE }}
# TODO(dtantsur): ipa-api-url should be populated by ironic itself, but it's
# not, so working around here.
# NOTE(dtantsur): keep inspection arguments synchronized with inspector.ipxe
extra_kernel_params = console=ttyS0 ipa-insecure=1 ipa-inspector-collectors=default,extra-hardware,logs ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 {% if env.IRONIC_FAST_TRACK == "true" %} ipa-api-url={{ env.IRONIC_BASE_URL }} {% endif %}{% if env.IRONIC_RAMDISK_SSH_KEY %} sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %}
extra_kernel_params = ipa-insecure=1 ipa-inspector-collectors=default,extra-hardware,logs ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 {% if env.IRONIC_FAST_TRACK == "true" %} ipa-api-url={{ env.IRONIC_BASE_URL }} {% endif %}{% if env.IRONIC_RAMDISK_SSH_KEY %} sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %} {{ env.IRONIC_KERNEL_PARAMS|trim }}

[ipmi]
# use_ipmitool_retries transfers the responsibility of retrying to ipmitool
Expand Down Expand Up @@ -154,11 +154,11 @@ pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template
tftp_master_path = /shared/tftpboot
tftp_root = /shared/tftpboot
uefi_pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template
pxe_append_params = nofb nomodeset vga=normal ipa-insecure=1 {% if env.IRONIC_RAMDISK_SSH_KEY %}sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %}
pxe_append_params = nofb nomodeset vga=normal ipa-insecure=1 {% if env.IRONIC_RAMDISK_SSH_KEY %}sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %} {{ env.IRONIC_KERNEL_PARAMS|trim }}

[redfish]
use_swift = false
kernel_append_params = console=ttyS0 nofb nomodeset vga=normal ipa-insecure=1 {% if env.IRONIC_RAMDISK_SSH_KEY %}sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %}
kernel_append_params = nofb nomodeset vga=normal ipa-insecure=1 {% if env.IRONIC_RAMDISK_SSH_KEY %}sshkey="{{ env.IRONIC_RAMDISK_SSH_KEY|trim }}"{% endif %} {{ env.IRONIC_KERNEL_PARAMS|trim }}

[service_catalog]
endpoint_override = {{ env.IRONIC_BASE_URL }}
Expand Down

0 comments on commit d896f15

Please sign in to comment.