From bc1751067551842f47d77fb17ec654191033f88f Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Fri, 18 Apr 2014 16:33:30 -0700 Subject: [PATCH] Remove 'fake' and 'ssh' drivers from default enabled list Remove the 'fake' and 'ssh' drivers, since they should not show up in production, and it is better to have production-oriented sane defaults. Updates the option doc string with a lengthy description. Updates the developer documentation with a link to the wiki page, where a list of CI-tested drivers will be maintained. Change-Id: I1151ace22752efdf6a8a43e279a57d728ea6cce2 --- doc/source/dev/drivers.rst | 39 +++++++++++++++++++++------------ etc/ironic/ironic.conf.sample | 13 +++++++---- ironic/common/driver_factory.py | 17 ++++++++------ 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/doc/source/dev/drivers.rst b/doc/source/dev/drivers.rst index 0800ede5c9..368f21ed3d 100644 --- a/doc/source/dev/drivers.rst +++ b/doc/source/dev/drivers.rst @@ -4,23 +4,34 @@ Pluggable Drivers ================= -The IPMITool driver provides an interface to the command-line `ipmitool`_ -utility, whereas the IPMINative driver provides an interface to the newer -`pyghmi`_ python library. +Ironic supports a pluggable driver model. This allows contributors to easily +add new drivers, and operators to use third-party drivers or write their own. -The SSH driver provides an interface to control the power state of virtual -machines used in our test environments. +Drivers are loaded by the ironic-conductor service during initialization, by +enumerating the python entrypoint "ironic.drivers" and attempting to load +all drivers specified in the "enabled_drivers" configuration option. A +complete list of drivers available on the system may be found by +enumerating this entrypoint by running the following python script:: -The SeaMicro driver provides an enhanced interface for SeaMicro hardware. + #!/usr/bin/env python + + import pkg_resources as pkg + print [p.name for p in pkg.iter_entry_points("ironic.drivers") if not p.name.startswith("fake")] + +A list of drivers enabled in a running Ironic service may be found by issuing +the following command against that API end point:: + + ironic driver-list + + +Supported Drivers +----------------- + +For a list of supported drivers (those that are continuously tested on every +upstream commit) please consult the wiki page:: + + https://wiki.openstack.org/wiki/Ironic/Drivers .. toctree:: ../api/ironic.drivers.base ../api/ironic.drivers.pxe - ../api/ironic.drivers.modules.ipminative - ../api/ironic.drivers.modules.ipmitool - ../api/ironic.drivers.modules.pxe - ../api/ironic.drivers.modules.seamicro - ../api/ironic.drivers.modules.ssh - -.. _ipmitool: http://ipmitool.sourceforge.net/ -.. _pyghmi: https://github.com/stackforge/pyghmi diff --git a/etc/ironic/ironic.conf.sample b/etc/ironic/ironic.conf.sample index e06c338a5e..dd8396fec5 100644 --- a/etc/ironic/ironic.conf.sample +++ b/etc/ironic/ironic.conf.sample @@ -218,10 +218,15 @@ # Options defined in ironic.common.driver_factory # -# List of drivers to enable. Missing drivers, or drivers which -# can not be loaded will be treated as a fatal exception. -# (list value) -#enabled_drivers=fake,pxe_ipmitool,pxe_ssh +# Specify the list of drivers to load during service +# initialization. Missing drivers, or drivers which fail to +# initialize, will prevent the conductor service from +# starting. The option default is a recommended set of +# production-oriented drivers. A complete list of drivers +# present on your system may be found by enumerating the +# "ironic.drivers" entrypoint. An example may be found in the +# developer documentation online. (list value) +#enabled_drivers=pxe_ipmitool # diff --git a/ironic/common/driver_factory.py b/ironic/common/driver_factory.py index 19cf53b192..e5f45100c6 100644 --- a/ironic/common/driver_factory.py +++ b/ironic/common/driver_factory.py @@ -23,15 +23,18 @@ from stevedore import dispatch LOG = log.getLogger(__name__) -# TODO(deva): remove 'fake' and 'pxe_ssh' testing drivers from the defaults -# once appropriate test environments (devstack & triple) -# are updated driver_opts = [ cfg.ListOpt('enabled_drivers', - default=['fake', 'pxe_ipmitool', 'pxe_ssh'], - help='List of drivers to enable. Missing drivers, or ' - 'drivers which can not be loaded will be ' - 'treated as a fatal exception.'), + default=['pxe_ipmitool'], + help='Specify the list of drivers to load during service ' + 'initialization. Missing drivers, or drivers which ' + 'fail to initialize, will prevent the conductor ' + 'service from starting. The option default is a ' + 'recommended set of production-oriented drivers. A ' + 'complete list of drivers present on your system may ' + 'be found by enumerating the "ironic.drivers" ' + 'entrypoint. An example may be found in the ' + 'developer documentation online.'), ] CONF = cfg.CONF