get_supported_boot_devices() returns static device list

Bug #1391598 reported by Matt Keenan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Matt Keenan

Bug Description

Exposed driver interface get_supported_boot_devices() currently does not accept a "task" parameter, resulting in the specific driver not being able to query a specific node to determine the list of supported boot devices.

If "task" parameter was passed in, similar to most other exposed interfaces, the node for this task could be queried say for architecture type, and the correct list supported boot devices for this specific node could be returned.

As it stands in most cases a static list is always returned as the node specific to the request is not known within the specific driver.

Revision history for this message
Matt Keenan (mattkeenan) wrote :

Example of change for base driver and conductor manager code.

Tan Lin (tan-lin-good)
Changed in ironic:
assignee: nobody → Tan Lin (tan-lin-good)
Revision history for this message
Dmitry Tantsur (divius) wrote :

Please note that querying e.g. BMC in a sync method is a quite bad idea, so I'm not sure how I feel about this change. Do you have use cases that do not involve potentially long-running operations?

Changed in ironic:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
Matt Keenan (mattkeenan) wrote :

My specific use case would be for SPARC hardware vs X86 hardware. SPARC does not support PXE boot for instance, so returning a hard coded list of boot devices which include this would be incorrect.

To determine the architecture of the Node I was planning on querying the BMC via ipmitool command :
   sunoem getval /System/Processors/architecture

I know discovery/introspection is planned for Kilo cycle, so this architecture information should be present in the node properties in most cases, so a call to the BMC should not be required in most cases, but for Juno would be required.

Revision history for this message
Dmitry Tantsur (divius) wrote :

Architecture information should already be present for a node (even in Juno - manually), otherwise it won't get scheduled. So while this feature looks helpful, your use case sounds pretty dangerous. You may want to chat with all cores on the next meeting about it: https://wiki.openstack.org/wiki/Meetings/Ironic

Revision history for this message
Matt Keenan (mattkeenan) wrote :

Even if architecture information is present either manually added (Juno) or via introspection (Kilo), one cannot get to this node specific information without the task being passed to the method it self which contains the node object.

Passing of task object to this method would not specifically infer accessing the BMC, it would surely be just a matter of :

   task.node.driver_info.get("architecture")

or something similar. And once this is known a list of known boot devices for this architecture type could be returned.

Tan Lin (tan-lin-good)
Changed in ironic:
assignee: Tan Lin (tan-lin-good) → nobody
Matt Keenan (mattkeenan)
Changed in ironic:
assignee: nobody → Matt Keenan (matt-keenan-n)
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/188466

Changed in ironic:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/188466
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=466797227845f1d0e40de88cdf507f8fbf0ab5d3
Submitter: Jenkins
Branch: master

commit 466797227845f1d0e40de88cdf507f8fbf0ab5d3
Author: Matt Keeann <email address hidden>
Date: Thu Jun 4 17:01:42 2015 +0100

    get_supported_boot_devices() returns static device list

    Returning a static device list currently is only applicable
    to x86 based architectures. If a node references for instance
    sparc architecture, then "pxe" boot is not supported, however
    "wanboot" is. The driver referenced by the node should be able
    to return a custom boot device list dependent on the architecture
    of the node. However to achieve this the task needs to be passed
    as an argument in get_supported_boot_devices()

    Change-Id: I5ae70ee84309dffb7d7bca4ac5cba28b01b7c414
    Closes-Bug: #1391598
    Implements: blueprint supported-boot-device-list

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
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.