components/openstack/ironic/patches/03-boot-device.patch
author Matt Keenan <matt.keenan@oracle.com>
Wed, 10 Jun 2015 10:12:11 +0100
changeset 4460 e5811789e2fb
child 5405 66fd59fecd68
permissions -rw-r--r--
PSARC 2015/172 OpenStack Ironic (OpenStack Bare Metal Provisioning Service) PSARC 2015/070 pecan - Lightweight Python web-framework PSARC 2015/071 PyCA Python Cryptography PSARC 2015/170 OpenStack client for Ironic (Bare Metal Provisioning) PSARC 2015/171 scp - python secure copy PSARC 2015/196 singledispatch - Single-dispatch generic functions for Python PSARC 2015/197 logutils - Set of handlers for standard Python logging library PSARC 2015/198 Support for enumerations in Python 2.6 and 2.7 PSARC 2015/250 paramiko - SSHv2 protocol implementation in Python 20547142 Request to integrate Ironic into userland 17502639 The Python paramiko module should be added to Userland 20172780 The Python module scp should be added to Userland 20180376 The Python module ironicclient should be added to Userland 20182588 The Python module pecan should be added to Userland 20465525 The PyCA cryptography module should be added to Userland 20904396 The Python module singledispatch should be added to Userland 20904413 The Python module logutils should be added to Userland 20917993 The Python enum34 module should be added to Userland

Ironic is very "Linux" centric, so for all nodes regardless of architecture it
reports the same list of supported boot devices.

This is not correct for SPARC, e.g. PXE is not supported.

This patch simply passes the task into the driver implemented method for 
getting the boot device so that architecture specific information can be
returned.

Upstream bug logged against trunk:
  https://bugs.launchpad.net/ironic/+bug/1391598

--- ORIGINAL/ironic/conductor/manager.py	2015-02-20 18:03:18.051557776 +0000
+++ ironic-2014.2.1/ironic/conductor/manager.py	2015-02-20 18:08:33.001316709 +0000
@@ -1380,4 +1380,4 @@
             if not getattr(task.driver, 'management', None):
                 raise exception.UnsupportedDriverExtension(
                             driver=task.node.driver, extension='management')
-            return task.driver.management.get_supported_boot_devices()
+            return task.driver.management.get_supported_boot_devices(task)
--- ORIGINAL/ironic/drivers/base.py	2015-02-20 18:03:18.037072121 +0000
+++ ironic-2014.2.1/ironic/drivers/base.py	2015-02-20 18:09:58.769898691 +0000
@@ -436,9 +436,10 @@
         """
 
     @abc.abstractmethod
-    def get_supported_boot_devices(self):
+    def get_supported_boot_devices(self, task=None):
         """Get a list of the supported boot devices.
 
+        :param task: a task from TaskManager.
         :returns: A list with the supported boot devices defined
                   in :mod:`ironic.common.boot_devices`.
         """