summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/agent.py
diff options
context:
space:
mode:
authorMichael Turek <mjturek@linux.vnet.ibm.com>2018-06-29 09:32:57 -0400
committerMichael Turek <mjturek@linux.vnet.ibm.com>2018-07-31 19:52:29 +0000
commit8f89954f9a3edab71db1157578e9d029a395d2d9 (patch)
treeb5c36bd0cc53d5adb60ba2af9a97768f41d99ceb /ironic/drivers/modules/agent.py
parent69520d26107fb98433099f0bc647b864cc777217 (diff)
downloadironic-8f89954f9a3edab71db1157578e9d029a395d2d9.tar.gz
Pass prep_boot_part_uuid to install_bootloader for ppc64* partition images
This patch gets the PReP Boot partition UUID when performing a local boot partition image deployment on ppc64* hardware. Depends-On: I8f9748dd58146bfb2411c229b02969e0faf18222 Change-Id: I2bc9f13ec605de7b7b96d96a1a4edebee0af76dc Story: #1749057 Task: #22995
Diffstat (limited to 'ironic/drivers/modules/agent.py')
-rw-r--r--ironic/drivers/modules/agent.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/ironic/drivers/modules/agent.py b/ironic/drivers/modules/agent.py
index 997b23147..a015f6305 100644
--- a/ironic/drivers/modules/agent.py
+++ b/ironic/drivers/modules/agent.py
@@ -265,6 +265,7 @@ class AgentDeployMixin(agent_base_vendor.AgentDeployMixin):
task.process_event('resume')
node = task.node
iwdi = task.node.driver_internal_info.get('is_whole_disk_image')
+ cpu_arch = task.node.properties.get('cpu_arch')
error = self.check_deploy_success(node)
if error is not None:
# TODO(jimrollenhagen) power off if using neutron dhcp to
@@ -285,6 +286,9 @@ class AgentDeployMixin(agent_base_vendor.AgentDeployMixin):
# In case of local boot using partition image, we need both
# 'root_uuid_or_disk_id' and 'efi_system_partition_uuid' to configure
# bootloader for local boot.
+ # NOTE(mjturek): In the case of local boot using a partition image on
+ # ppc64* hardware we need to provide the 'PReP_Boot_partition_uuid' to
+ # direct where the bootloader should be installed.
driver_internal_info = task.node.driver_internal_info
root_uuid = self._get_uuid_from_result(task, 'root_uuid')
if root_uuid:
@@ -312,9 +316,14 @@ class AgentDeployMixin(agent_base_vendor.AgentDeployMixin):
efi_sys_uuid = None
if not iwdi:
if boot_mode_utils.get_boot_mode_for_deploy(node) == 'uefi':
- efi_sys_uuid = (
- self._get_uuid_from_result(task,
- 'efi_system_partition_uuid'))
+ efi_sys_uuid = (self._get_uuid_from_result(task,
+ 'efi_system_partition_uuid'))
+
+ prep_boot_part_uuid = None
+ if cpu_arch is not None and cpu_arch.startswith('ppc64'):
+ prep_boot_part_uuid = (self._get_uuid_from_result(task,
+ 'PReP_Boot_partition_uuid'))
+
LOG.info('Image successfully written to node %s', node.uuid)
if CONF.agent.manage_agent_boot:
@@ -324,7 +333,8 @@ class AgentDeployMixin(agent_base_vendor.AgentDeployMixin):
# be done on node during deploy stage can be performed.
LOG.debug('Executing driver specific tasks before booting up the '
'instance for node %s', node.uuid)
- self.prepare_instance_to_boot(task, root_uuid, efi_sys_uuid)
+ self.prepare_instance_to_boot(task, root_uuid,
+ efi_sys_uuid, prep_boot_part_uuid)
else:
manager_utils.node_set_boot_device(task, 'disk', persistent=True)