Commit Graph

14 Commits

Author SHA1 Message Date
Dmitry Tantsur d42bd9a77b Add "noop" management and use it in the "ipmi" hardware type
The new management interface targets hardware that does not correctly
support changing the boot device via IPMI. For example, some hardware
was reported to break the configured boot order in this case. Using
the "noop" management will allow operators to pre-define the boot order
as PXE -> DISK.

Change-Id: Iae2837b100905e9e06cc2cd2614f0af81bf13752
Story: #2003203
Task: #23359
2018-08-07 13:25:50 +00:00
Dmitry Tantsur 53e7baef42 Remove support for creating and loading classic drivers
* removes any bits related to loading classic drivers from
  the drivers factory code
* removes exceptions that only happen when classic drivers
  can be loaded
* removes the BaseDriver, moves the useful functionality to
  the BareDriver class
* /v1/drivers/?type=classic now always returns an empty list
* removes the migration updating classic drivers to hardware
  types

The documentation will be updated separately.

Change-Id: I8ee58dfade87ae2a2544c5dcc27702c069f5089d
2018-07-02 17:37:28 +02:00
Dmitry Tantsur 1a07137118 Remove the ipmitool classic drivers
This change removes pxe_ipmitool and agent_ipmitool. Some tests
and documentation bits are removed, since we no longer have any
classic drivers to provide examples.

The Inspector.create_if_enabled method is no longer used and was
removed. The [inspector]enabled option will be deprecated in
a follow-up.

IRONIC_ENABLED_DRIVERS is removed from devstack to prevent
devstack-gate from injecting the removed drivers into it.
A temporary migration from queens is updated to disable all
classic drivers. It will be removed when the enabled_drivers
option is completely removed.

Change-Id: Iab247e3b3336f90446ef0687edb340cf8282a925
2018-06-27 13:08:42 +02:00
Dmitry Tantsur cc6f7bc73e Automatically migrate nodes to hardware types
This change adds a new data migration: migrate_to_hardware_types.
It works by walking through known classic drivers, detecting matching
hardware types and interfaces and updates nodes accordingly.

Nodes that cannot be updated (e.g. matching hardware type is not
enabled) are skipped. A new migration option reset_unsupported_interfaces
can be set to True to allow resetting optional interfaces to their
no-op versions.

The example implementation are provided for the community supported
IPMI and SNMP drivers, as well as for fake drivers based on them.

Change-Id: I732b44f2ab1ef73f56b352415ffd9cdd8a0e232b
Partial-Bug: #1690185
2018-01-26 21:17:26 +00:00
Dmitry Tantsur f428de5f55 Add ipmitool vendor interface to the ipmi hardware type
For some reason it was missing.

Change-Id: Ic86e452d033eec112cc3930b6857f07e0ef7720c
Closes-Bug: #1691504
2017-05-19 13:30:43 +02:00
Dmitry Tantsur 797544316e Add hardware type for IPMI using ipmitool
Created a new Python module ironic.drivers.ipmi to contain all
supported IPMI-related drivers (both new and old).
Backward compatible aliases are left at old locations.

Change-Id: I526b8505d08b25b668af76d3fcd8f2feab31e420
Partial-Bug: #1524745
2017-01-26 14:22:23 +01:00
Devananda van der Veen 59d5bea14a Restructuring driver API and inheritance.
Based on discussions during and after the Ironic team meeting on June
03, regarding support for substantially different driver work flows,
this is a re-working of the internal driver API.

tl;dr: The strict separation of "control" and "deploy" driver was an
       artefact of the ipmi + pxe implementation used in nova-baremetal,
       and does not map on to all drivers. Furthermore, the prior
       implementation did not accurately represent the separation of
       "core", "standard", and "vendor-specific" driver functionality.

These changes impact the v1 API structure, but since that is largely not
implemented yet, this change does not attempt to affect the public API
itself.

Highlights:
- No more deploy + control driver; nodes have one and only one driver.
  This drops the deploy_driver and deploy_info parameters,
  and renames control_driver -> driver, and control_info -> driver_info.
- Interfaces for core, standard, and vendor functionality now clearly
  defined in the driver API.
- Improve Fake driver to demonstrate use of interfaces.
- Convert IPMI and SSH driver classes into interfaces, and move to
  drivers/modules/ directory.
- Stub for the pxe interfaces.
- Stub implementations of pxe+ipmi and pxe+ssh drivers.
- driver_info field uses more standard names, but requires
  driver-specific data to be in a nested object. Examples in
  tests/db/utils.py as before.

A separate doc change will follow this to update the API v1 spec.

Also includes some cosmetic cleanup of test_ssh.py and test_ipmi.py.

Change-Id: I057ede8e07b1b57010e81ef58415debe0ba8b934
2013-06-11 17:12:21 -07:00
Devananda van der Veen 940485b9f9 Prevent IPMI actions from colliding.
Prevent IPMI actions from colliding with eachother, even if they are
issued to the API in parallel, by adding @require_exclusive_lock
decorators to public methods of the IPMIPowerDriver.

Change-Id: Ic5c12ff6a399b637eccb82c6ffd7e9c575f4edc4
2013-06-04 08:23:50 -07:00
Devananda van der Veen 378dfac26b Update IPMI driver to work with resource manager.
Update the IPMI driver so that Ironic's resource manager can maintain a
single instance of it, and pass (task, node) to IPMI methods.  This
brings the IPMI class in line with the base ControlDriver class
definition.

Add a missing exception to common/exceptions.py.

IPMI driver methods presently support being called for a single node at
a time.  Support for multiple nodes passed down by the TaskManager is
not part of this patch.

Remove terminal support. To be added back later.

Change-Id: Ibb9fc84f7b46d848b0c1ac761a3be952c99f7509
2013-05-24 13:54:21 -07:00
Devananda van der Veen 438b77e006 Add validate_driver_info to driver classes.
Change-Id: I8ba2f4bd70bd2d7af405868cca2aedb56d3f0640
2013-05-24 13:53:24 -07:00
Devananda van der Veen 9e079a6647 Change 'nodes' to use more driver-specific JSON.
Change the 'nodes' table to be more generic, allowing
drivers to be more flexible in the informatin they track.

Also adds a minimalistic 'chassis' table, and a FK pointing
from 'nodes' to 'chassis'.

Part of bp:ironic-manager

Change-Id: I0022841f31fdb3aa40883a0403a8427bd9a09a00
2013-05-22 19:56:09 -07:00
Devananda van der Veen c835425781 Update driver names and base class.
Also, add (task, node) to the base and fake driver method parameters.
Prepares the way for adding TaskManagers in a following patch.

Change-Id: I846227b2416445a539f9ac51d86b33ea49d4abcb
2013-05-22 19:55:32 -07:00
Devananda van der Veen e1109c9b99 Update IPMI driver for new base class.
Fix IPMI unit tests, and add missing power states and exceptions.
2013-05-13 00:59:44 -07:00
Devananda van der Veen 70d2f67e3e Add new base and fake driver classes. 2013-05-13 00:59:44 -07:00