iLO驱动的UEFI iSCSI启动¶
https://bugs.launchpad.net/ironic/+bug/1526861
HPE ProLiant服务器(Gen9及更高版本)通过其固件支持UEFI iSCSI启动。 提出的功能是在Ironic iLO驱动中添加对基于此固件的从iSCSI Cinder卷在UEFI模式下启动的支持。
问题描述¶
目前,Ironic具有从Cinder卷启动的能力。 此外,此支持是通过使用像iPXE这样的引导加载程序从iSCSI卷启动实现的。 它没有提供任何利用某些服务器固有支持使用其固件功能从iSCSI卷启动的功能的方法。 可以通过固件以编程方式配置硬件以从iSCSI卷启动。
提议的变更¶
此更改基于从卷启动 - 参考驱动程序规范中提出的参考驱动程序实现指南,以支持从托管和/或远程控制的存储设备启动ironic节点。 此更改为iLO驱动程序管理接口提出了两种新方法;即 set_iscsi_boot_target 和 clear_iscsi_boot_target,它们将促进使用iLO接口设置和清除支持UEFI iSCSI启动的HPE Proliant服务器的iSCSI目标信息。
在 ilo 硬件类型中,prepare_instance() 引导接口方法将检查实例请求的启动模式是否为‘UEFI’以及给定的卷是否可引导。 如果是,它将在iLO中设置iSCSI目标并将启动设备设置为iSCSI目标。
如果实例请求的启动模式为‘BIOS’,则对于两个引导接口(ilo-pxe 和 ilo-virtual-media)的行为如下
ilo-pxe:它将回退到iPXE以启动卷。ilo-virtual-media:它将抛出以下错误虚拟 介质 无法 在 bios 模式下 启动 卷。
带有其伪代码的
ilo-pxe引导接口的函数定义如下class IloPXEBoot(pxe.PXEBoot): def prepare_instance(self, task): """Prepares the boot of instance. :param task: a task from TaskManager. :returns: None :raises: IloOperationError, if some operation on iLO failed. """ if deploy_utils.is_iscsi_boot(task) and boot_mode == 'uefi': #Call the management interface task.driver.management.set_iscsi_boot_target(task) #Set boot device to 'ISCSIBOOT' deploy_utils.try_set_boot_device(task, boot_devices.ISCSIBOOT) else: #Let iPXE handle this super(IloPXEBoot, self).prepare_instance(task) def clean_up_instance(self, task): """Cleans up the boot of instance. :param task: a task from TaskManager. :returns: None :raises: IloOperationError, if some operation on iLO failed. """ if deploy_utils.is_iscsi_boot(task) and boot_mode == 'uefi': #Call the management interface task.driver.management.clear_iscsi_boot_target(task) else: #Let iPXE handle this super(IloPXEBoot, self).clean_up_instance(task)
带有其伪代码的
ilo-virtual-media引导接口的函数定义如下class IloVirtualMediaBoot(base.BootInterface): def prepare_instance(self, task): """Prepares the boot of instance. :param task: a task from TaskManager. :returns: None :raises: IloOperationError, if some operation on iLO failed. """ if deploy_utils.is_iscsi_boot(task) and boot_mode == 'uefi': #Call the management interface task.driver.management.set_iscsi_boot_target(task) #Set boot device to 'ISCSIBOOT' deploy_utils.try_set_boot_device(task, boot_devices.ISCSIBOOT) return elif deploy_utils.is_iscsi_boot(task) and boot_mode == 'bios': #Throw the error in bios boot mode msg = 'virtual media can not boot volume in bios mode.' raise exception.InstanceDeployFailure(msg) else: #Default code def clean_up_instance(self, task): """Cleans up the boot of instance. :param task: a task from TaskManager. :returns: None :raises: IloOperationError, if some operation on iLO failed. """ if deploy_utils.is_iscsi_boot(task) and boot_mode == 'uefi': #Call the management interface task.driver.management.clear_iscsi_boot_target(task) else: #Fall to virtual media cleanup
将在 ilo 驱动程序管理接口 ilo.management.IloManangement 中添加两种新方法:* set_iscsi_boot_target() - 将iSCSI目标信息设置到iLO * clear_iscsi_boot_target() - 从iLO清除iSCSI目标信息
将发布支持上述方法的新版本的proliantutils库。
带有其伪代码的函数定义如下
class IloManagement(base.ManagementInterface): def set_iscsi_boot_target(self, task): """Set iscsi boot volume target info from the node. :param task: a task from TaskManager. """ #Proliants call to set iscsi target info def clear_iscsi_boot_target(self, task): """Clear iscsi boot volume target info from the node. :param task: a task from TaskManager. """ #Library call to clear iscsi target info
备选方案¶
无。
数据模型影响¶
无。
状态机影响¶
无。
REST API 影响¶
无。
客户端 (CLI) 影响¶
无。
RPC API 影响¶
无。
驱动程序 API 影响¶
无。
Nova 驱动程序影响¶
无。
安全影响¶
无。
Ramdisk 影响¶
无。
其他最终用户影响¶
无。
可扩展性影响¶
无。
性能影响¶
无。
其他部署者影响¶
部署者将能够使用此更改配置支持UEFI iSCSI启动的服务器。 工作流程如下
操作员使用适当的硬件类型和引导接口配置节点,并在
node.properties['capabilities']中添加功能iscsi_boot=true(或者它可以由检查填充,但填充方式不属于此规范的范围)。操作员创建一个具有Compute功能
iscsi_boot=true的flavor,以请求从Cinder卷启动的裸机实例。租户创建一个Cinder卷。
租户请求使用上述flavor启动的带有Cinder卷的裸机实例。
具有‘iscsi_boot=true’功能的‘ilo-virtual-media’作为引导接口的节点也应配置为仅将‘boot_mode’功能配置为‘uefi’。
Nova Ironic virt驱动程序将有关iSCSI卷的信息传递给Ironic。 有关更多信息,请参阅ironic规范 为Ironic节点添加卷连接信息。
开发人员影响¶
无。
实现¶
负责人¶
- 主要负责人
kesper
- 其他贡献者
deray stendulker
工作项¶
需要在
ilo-pxe和ilo-virtual-media引导接口中添加更改。需要在
ilo管理接口中实现set_iscsi_boot_target和clear_iscsi_boot_target。
依赖项¶
无。
测试¶
此功能将使用HPE iLO第三方CI进行测试。
升级和向后兼容性¶
无。
文档影响¶
iLO驱动程序文档将针对此功能进行更新。