summaryrefslogtreecommitdiff
path: root/ironic
diff options
context:
space:
mode:
authorJacek Tomasiak <jacek.tomasiak@gmail.com>2017-04-21 08:56:25 +0200
committerJacek Tomasiak <jacek.tomasiak@gmail.com>2017-04-27 06:47:48 +0000
commit451251def7aa5fc2cf9cabdde2d73e52d5dbb3a6 (patch)
tree2f6d565785fa2b78747c1b3bff70a755f65684cb /ironic
parente9ce5d15c74f8410738ae6be8d7cf235fdfdc49d (diff)
downloadironic-451251def7aa5fc2cf9cabdde2d73e52d5dbb3a6.tar.gz
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 (cherry picked from commit cbc29a9b7b78eafa830e2752e2c7f43604917259)
Diffstat (limited to 'ironic')
-rw-r--r--ironic/drivers/modules/deploy_utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ironic/drivers/modules/deploy_utils.py b/ironic/drivers/modules/deploy_utils.py
index ce7da1971..4cf11d1a6 100644
--- a/ironic/drivers/modules/deploy_utils.py
+++ b/ironic/drivers/modules/deploy_utils.py
@@ -401,12 +401,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}