pxe_ilo driver will fail on ipmitool error after switching from uefi to bios boot mode

Bug #1370466 reported by Syed Ismail Faizan Barmawer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Syed Ismail Faizan Barmawer

Bug Description

After switching from uefi to bios boot mode, one system reset is required in iLO for persistent boot device settings. pxe driver call set_boot_device() which internally calls ipmitool to set boot device to pxe, will fail in such scenarios.
anyway for pxe_ilo driver, we do not require this call using ipmitool, as persistent setting of boot device is done in vendor_passthru using proliantutils ilo_client functions.

Tags: ilo
tags: removed: ironic juno-rc1
Revision history for this message
Dmitry Tantsur (divius) wrote :

In the future, please don't put _solution_ in the bug description, just state your problem.

Changed in ironic:
status: New → Triaged
importance: Undecided → Medium
Changed in ironic:
assignee: nobody → Syed Ismail Faizan Barmawer (faizan-barmawer)
Revision history for this message
Syed Ismail Faizan Barmawer (faizan-barmawer) wrote :

Moving the solution part here:

We can have following solutions for this issue.

1. In PXE deploy driver, skip calling set_boot_device() if driver is "pxe_ilo"
In "ironic/drivers/modules/pxe.py":

Replace

333 try:
334 manager_utils.node_set_boot_device(task, 'pxe', persistent=True)
335 except exception.IPMIFailure:

with

333 try:
                    if task.node.driver != 'pxe_ilo':
334 manager_utils.node_set_boot_device(task, 'pxe', persistent=True)
335 except exception.IPMIFailure:

2. Catch IPMIFailure exception in PXE deploy driver and continue if the driver is "pxe_ilo"
In "ironic/drivers/modules/pxe.py":

333 try:
334 manager_utils.node_set_boot_device(task, 'pxe', persistent=True)
335 except exception.IPMIFailure:
336 if driver_utils.get_node_capability(task.node,
337 'boot_mode') == 'uefi':
338 LOG.warning(_LW("ipmitool is unable to set boot device while "
339 "the node is in UEFI boot mode."
340 "Please set the boot device manually."))
341 else:
342 raise

replace with

333 try:
334 manager_utils.node_set_boot_device(task, 'pxe', persistent=True)
335 except exception.IPMIFailure:
336 if driver_utils.get_node_capability(task.node,
337 'boot_mode') == 'uefi':
338 LOG.warning(_LW("ipmitool is unable to set boot device while "
339 "the node is in UEFI boot mode."
340 "Please set the boot device manually."))
341 else:
                        if task.node.driver != 'pxe_ilo':
342 raise

3. Catch IPMIFailure exception in pxe_ilo driver from PXEdeploy call and continue with deploy.

Since pxe_ilo deploy will set the boot device using proliantutils , pxe_ilo driver should catch IPMIToolFailure while doing deploy and continue with deploy.
"ironic/drivers/modules/ilo/deploy.py":

444 return super(IloPXEDeploy, self).deploy(task)

The above code should be replaced with:

447 try:
448 return super(IloPXEDeploy, self).deploy(task)
449 except exception.IPMIFailure:
450 ilo_common.set_boot_device(task.node, 'NETWORK', False)
451 manager_utils.node_power_action(task, states.REBOOT)
452 return states.DEPLOYWAIT

description: updated
Revision history for this message
Anusha (anusha-iiitm) wrote :
Changed in ironic:
status: Triaged → In Progress
Wan-yen Hsu (wanyenhsu)
tags: added: ironic juno-rc1
aeva black (tenbrae)
tags: added: ilo
removed: ironic juno-rc1
aeva black (tenbrae)
Changed in ironic:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/123660

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (master)

Change abandoned by Dmitry Tantsur (<email address hidden>) on branch: master
Review: https://review.openstack.org/123660
Reason: duplicate of https://review.openstack.org/#/c/122819/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/122819
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=56dcee473e48dab82b1d1942184f8f28c0a8404a
Submitter: Jenkins
Branch: master

commit 56dcee473e48dab82b1d1942184f8f28c0a8404a
Author: Faizan Barmawer <email address hidden>
Date: Wed Sep 24 04:32:38 2014 -0400

    pxe_ilo driver to call iLO set_boot_device

    After switching from uefi to bios boot mode, one system reset is
    required in iLO for persistent boot device settings.pxe driver call
    set_boot_device() which internally calls ipmitool to set boot device
    to pxe, will fail in such scenarios.

    This fix proposes to change the management interface for pxe_ilo driver
    to call ilo set_boot_device using proliantutils ilo_client functions
    instead of IPMI call

    Change-Id: Idc0e3a765f447ae1d1118299e4815a06995e5414
    Closes-bug: #1370466

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.