From db31628dea1eaddff91cd962fb2d4a9ec93e44e3 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 4 Nov 2019 14:11:05 +0100 Subject: [PATCH] Backward compatibility for the ramdisk_params change Follow-up to commit 08fe4af481444441084fa60cd0ff0246e5e65dcb restoring support for ipa-api-url in custom templates and adding a release note explaining the change. Story: #1528920 Change-Id: Ic8fc31fcde9a6f685bb1390a75a6a010c149f628 --- ironic/drivers/modules/ipxe.py | 3 +++ ironic/drivers/modules/pxe.py | 3 +++ releasenotes/notes/ramdisk-params-6083bfaa7ffa9dfe.yaml | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 releasenotes/notes/ramdisk-params-6083bfaa7ffa9dfe.yaml diff --git a/ironic/drivers/modules/ipxe.py b/ironic/drivers/modules/ipxe.py index 49ac313481..cee95bb837 100644 --- a/ironic/drivers/modules/ipxe.py +++ b/ironic/drivers/modules/ipxe.py @@ -160,6 +160,9 @@ class iPXEBoot(pxe_base.PXEBaseMixin, base.BootInterface): pxe_options = pxe_utils.build_pxe_config_options( task, pxe_info, ipxe_enabled=True, ramdisk_params=ramdisk_params) + # TODO(dtantsur): backwards compability hack, remove in the V release + if ramdisk_params.get("ipa-api-url"): + pxe_options["ipa-api-url"] = ramdisk_params["ipa-api-url"] pxe_config_template = deploy_utils.get_pxe_config_template(node) diff --git a/ironic/drivers/modules/pxe.py b/ironic/drivers/modules/pxe.py index a73f18abfe..e70a05721d 100644 --- a/ironic/drivers/modules/pxe.py +++ b/ironic/drivers/modules/pxe.py @@ -166,6 +166,9 @@ class PXEBoot(pxe_base.PXEBaseMixin, base.BootInterface): pxe_options = pxe_utils.build_pxe_config_options( task, pxe_info, ipxe_enabled=ipxe_enabled, ramdisk_params=ramdisk_params) + # TODO(dtantsur): backwards compability hack, remove in the V release + if ramdisk_params.get("ipa-api-url"): + pxe_options["ipa-api-url"] = ramdisk_params["ipa-api-url"] pxe_config_template = deploy_utils.get_pxe_config_template(node) diff --git a/releasenotes/notes/ramdisk-params-6083bfaa7ffa9dfe.yaml b/releasenotes/notes/ramdisk-params-6083bfaa7ffa9dfe.yaml new file mode 100644 index 0000000000..f0c816974c --- /dev/null +++ b/releasenotes/notes/ramdisk-params-6083bfaa7ffa9dfe.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + The operators using custom PXE/iPXE/Grub templates should update them to + remove an explicit mention of ``ipa-api-url``. This field is now a part + of ``pxe_append_params`` when required.