From 2364c8b247899f8ac9fb42b53a070db2ea50a2e0 Mon Sep 17 00:00:00 2001 From: shenjiatong Date: Sun, 29 Sep 2019 09:01:24 +0800 Subject: [PATCH] grub configuration should use user kernel & ramdisk compared with pxe_config.template, ramdisk boot with grub should use aki_path and ari_path Change-Id: Ibedf375cfeeb20917f06e52b1e86a6990a3c494b Story: 2006639 Task: 36855 --- ironic/drivers/modules/pxe_grub_config.template | 4 ++-- ironic/tests/unit/drivers/pxe_grub_config.template | 4 ++-- ...amdisk-grub-use-user-kernel-ramdisk-7d572fe130932605.yaml | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/ramdisk-grub-use-user-kernel-ramdisk-7d572fe130932605.yaml diff --git a/ironic/drivers/modules/pxe_grub_config.template b/ironic/drivers/modules/pxe_grub_config.template index 1845f176d7..e73cd4607a 100644 --- a/ironic/drivers/modules/pxe_grub_config.template +++ b/ironic/drivers/modules/pxe_grub_config.template @@ -13,8 +13,8 @@ menuentry "boot_partition" { } menuentry "boot_ramdisk" { - linuxefi {{ pxe_options.deployment_aki_path }} root=/dev/ram0 text {{ pxe_options.pxe_append_params|default("", true) }} {{ pxe_options.ramdisk_opts|default('', true) }} - initrdefi {{ pxe_options.deployment_ari_path }} + linuxefi {{ pxe_options.aki_path }} root=/dev/ram0 text {{ pxe_options.pxe_append_params|default("", true) }} {{ pxe_options.ramdisk_opts|default('', true) }} + initrdefi {{ pxe_options.ari_path }} } menuentry "boot_whole_disk" { diff --git a/ironic/tests/unit/drivers/pxe_grub_config.template b/ironic/tests/unit/drivers/pxe_grub_config.template index 15e3635a09..d1574bbbd5 100644 --- a/ironic/tests/unit/drivers/pxe_grub_config.template +++ b/ironic/tests/unit/drivers/pxe_grub_config.template @@ -13,8 +13,8 @@ menuentry "boot_partition" { } menuentry "boot_ramdisk" { - linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel root=/dev/ram0 text test_param ramdisk_param - initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk + linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel root=/dev/ram0 text test_param ramdisk_param + initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk } menuentry "boot_whole_disk" { diff --git a/releasenotes/notes/ramdisk-grub-use-user-kernel-ramdisk-7d572fe130932605.yaml b/releasenotes/notes/ramdisk-grub-use-user-kernel-ramdisk-7d572fe130932605.yaml new file mode 100644 index 0000000000..06a4bba3f7 --- /dev/null +++ b/releasenotes/notes/ramdisk-grub-use-user-kernel-ramdisk-7d572fe130932605.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Fixes a bug with the grub ramdisk boot template handling, such that the template now properly + references the user provided kernal and ramdisk. Previously the deployment ramdisk and kernel + was referenced in the template.