From cbc29a9b7b78eafa830e2752e2c7f43604917259 Mon Sep 17 00:00:00 2001 From: Jacek Tomasiak Date: Fri, 21 Apr 2017 08:56:25 +0200 Subject: [PATCH] Read disk identifier after config drive setup If original disk image has ID of 0x00000000 it's overwritten by parted with a non-zero value. The original ID is stored in pxelinux.cfg/* config file and the node fails to boot. Reading the ID was moved to after config drive setup so that the final ID is returned. Change-Id: Icbfa3e93bf6252177a0baa5f89bf4565ff331520 Closes-Bug: #1685093 --- ironic/drivers/modules/deploy_utils.py | 3 ++- .../fix-disk-identifier-overwrite-42b33a5a0f7742d8.yaml | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/fix-disk-identifier-overwrite-42b33a5a0f7742d8.yaml diff --git a/ironic/drivers/modules/deploy_utils.py b/ironic/drivers/modules/deploy_utils.py index 8813d4b7bd..888f441484 100644 --- a/ironic/drivers/modules/deploy_utils.py +++ b/ironic/drivers/modules/deploy_utils.py @@ -417,12 +417,13 @@ def deploy_disk_image(address, port, iqn, lun, with _iscsi_setup_and_handle_errors(address, port, iqn, lun) as dev: disk_utils.populate_image(image_path, dev) - disk_identifier = disk_utils.get_disk_identifier(dev) if configdrive: disk_utils.create_config_drive_partition(node_uuid, dev, configdrive) + disk_identifier = disk_utils.get_disk_identifier(dev) + return {'disk identifier': disk_identifier} diff --git a/releasenotes/notes/fix-disk-identifier-overwrite-42b33a5a0f7742d8.yaml b/releasenotes/notes/fix-disk-identifier-overwrite-42b33a5a0f7742d8.yaml new file mode 100644 index 0000000000..6404bc15ea --- /dev/null +++ b/releasenotes/notes/fix-disk-identifier-overwrite-42b33a5a0f7742d8.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - Fix handling of whole disk images with 0x00000000 disk identifier. + Instances failed to boot as the identifier in boot config was overwritten + during config drive creation. See https://bugs.launchpad.net/ironic/+bug/1685093