| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simulating workloads with the fake driver currently misses the reality
that some operations take time to complete, rather than occuring
instantly. This makes it difficult to mock real workloads for
performance and functional testing of ironic itself.
This change adds configurable random wait times for fake drivers in a
new ironic.conf [fake] section. Each supported driver having one
configuration option controlling the delay. These delays are applied
to operations which typically block in other drivers.
The default value of zero continues the existing behaviour of no
delay. A single integer value will result in a constant delay in
seconds. Two values separated by a comma will result in a triangular
distribution weighted by the first value, specifically in python[1]:
random.triangular(a, b, a)
Change-Id: I7cb1b50d035939e6c4538b3373002a309bfedea4
[1] https://docs.python.org/3/library/random.html#random.triangular
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds ``get_indicator_state``, ``set_indicator_state`` and
``get_supported_indicators`` methods to driver management interface.
Drivers can override these methods implementing indicators (e.g.
LEDs) management calls against the BMC of the baremetal nodes being
managed.
The spec: https://review.opendev.org/#/c/655685/7/specs/approved/expose-hardware-indicators.rst
Change-Id: I952de78312f09897e6b743e11c9cc5dac977dc36
Story: 2005342
Task: 30311
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A long time ago, in a galaxy not so far away,
the ironic comunity reached consensus that we
should refactor the PXE interface such that we
had separate PXE and iPXE interfaces.
In looking at what it would take for something like
a standalone deployment to have multiarchitecture
support in their environment, it seems even more
urgent and necessary that we begin to make this
delineation. This is because while some ARM iPXE
support exists, the binary is not a commonly
shipped artifiact, so operators are largely
only left with grubaa64.efi as their bootloader.
A similar issue exists with ppc64le deployments
where they must disable iPXE, as the ppc64le
hardware expects reading a syslinux compatible
file, similarlly no iPXE loader exists.
To start this effort, we need to promote iPXE
functionality to a dedicated interface,
and remove the necessity of setting the
[pxe]ipxe_enabled setting.
Next steps, beyond this patch, would be to
begin to tease out the common private method
code in the underlying PXE interface that both
the iPXE and PXE interfaces use, and appropriately
relocate and refactor that code as necesary.
During this process, we can create an [ipxe]
configuration section, and migrate settings.
Finally, once the deprecation cycle is complete,
we will be able to remove the ipxe logic with-in
the PXE interface.
Change-Id: I392616417c48986e84e50a3ddc7567344bfe3571
Story: #1628069
Task: #10516
|
|
|
|
|
|
|
|
| |
Support for "fake" is kept for backward compatibility and is deprecated.
Change-Id: Ibee573e660e2ba4204ecb68c8d80ad8d1e0b9a74
Story: #2003203
Task: #23361
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a 'deploy_step' decorator. A deploy step must take as the
only positional argument, a TaskManager object.
A step can be executed synchronously or asynchronously. A step should
return None if the method has completed synchronously or
states.DEPLOYWAIT if the step will continue to execute asynchronously.
If the step executes asynchronously, it should issue a call to the
'continue_node_deploy' RPC, so the conductor can begin the next
deploy step.
Only steps with priorities greater than 0 are used.
These steps are ordered by priority from highest value to lowest
value. For steps with the same priority, they are ordered by driver
interface priority (see conductor.manager.DEPLOYING_INTERFACE_PRIORITY).
All in-tree DeployInterfaces are converted to have one big deploy_step
(their existing deploy() method).
A new RPC method 'continue_node_deploy' (RPC API version 1.45) is used
by deploy steps to notify the conductor to continue node deployment
(e.g. execute the next deploy step).
Similar to cleaning, the conductor gets the node's deploy steps and
executes them, one at a time (one deploy step right now). The conductor
also handles out-of-tree drivers that don't have deploy steps yet; a
warning is logged in these cases.
Co-Authored-By: Ruby Loo <rloo@oath.com>
Change-Id: I5feac3856cc4b87a850180b7fd0b3b9805f9225f
Story: #1753128
Task: #22592
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
sync_node_setting takes a list of bios settings as input
and sorts out a tuple of lists of create, update, delete
and nochange settings by comparing the given settings with
node 'bios_settings' database table.
This commit also modifies fake BIOS interface to use
sync_node_setting for testing purpose.
Change-Id: I831b3db8f4da24d88a81b4d85889f7fd6f83ffdb
Story: #1712032
|
| |
| |
| |
| |
| |
| | |
The grenade configuration is updated to disable the fake driver.
Change-Id: Ica2b466a1a22ca2e5d1362377692cc39ef53ce2c
|
|/
|
|
|
|
|
|
| |
In order to start tempest testing using FakeBIOS, we
need to fix some issues, like enabling it on the fake
driver, and add the clean_steps decorators.
Change-Id: I7c47187b823c3a0ce1784849d401bd6baafe2542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Adds 'bios' interface to 'BaseDriver'
* Adds BIOSInterface driver class
* Adds fake & no-bios drivers and entries
* Implements it for 'fake-hardare' hardware type
* Adds configuration parameters:
+ [DEFAULT]/enabled_bios_interfaces
+ [DEFAULT]/default_bios_interface
* Adds 'bios_interface' field to Node object
* Handle 'bios_interface' field in _convert_to_version
* Adds bios in CLEANING_INTERFACE_PRIORITY
Drivers can implement this interface to do BIOS
configuration.
Co-Authored-By: Yolanda Robla Mota <yroblamo@redhat.com>
Co-Authored-By: Luong Anh Tuan <tuanla@vn.fujitsu.com>
Change-Id: I7e57130242b6cab21b54e35dc3c0b7819bdc43c0
Story: #1712032
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have method passthru that is accepting parameter async,
but since python 3.7 use async as reserved word,
the async parameter is deprecated,
async_call should be used instead.
async parameter will be removed in the next cycle.
Change-Id: I6299aafd30faae9a93df2cb901c1505df47e6b45
Task: 9289
Story: 1751306
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've tried my best to provide a correct matching for these, but
there are two exceptions:
* fake_drac uses iscsi deploy with None boot, which cannot work,
so changing both to fake
* some fake drivers are migrated to the 'fake' power interface,
which is changed to include soft power as well.
The latter means that all fake classic drivers now support fake
soft power actions, while previously only fake_soft_power did.
Now fake_soft_power is identical to fake and is left for backward
compatibility
Also wrote more tests to check correctness of this migration.
Change-Id: I00c9c6ed698b10f035e65428e1a20d733c7e544a
Partial-Bug: #1690185
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements agent based rescue interface.
Partial-Bug: #1526449
Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com>
Co-Authored-By: Aparna <aparnavtce@gmail.com>
Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com>
Change-Id: I9b4c1278dc5fab7888fbfe586c15e31ed3958978
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds `rescue` interface to `BaseDriver` and implements
it for `fake-hardware` hardware type. It adds configuration
parameters '[DEFAULT]/enabled_rescue_interfaces' and
'[DEFAULT]/default_rescue_interface'. The default value of
configuration parameter '[DEFAULT]/enabled_rescue_interfaces' is
`no-rescue`.
It adds new rescue states and a new 'rescue' field to the Node
object. It adds objects.node.Node._convert_to_version().
The method handles converting the new rescue_interface field
between different versions of the Node.
Partial-bug: #1526449
Co-Authored-By: Jay Faulkner <jay@jvf.cc>
Co-Authored-By: Josh Gachnang <josh@pcsforeducation.com>
Co-Authored-By: Jesse J. Cook <jesse.j.cook@member.fsf.org>
Co-Authored-By: Mario Villaplana <mario.villaplana@gmail.com>
Co-Authored-By: Aparna <aparnavtce@gmail.com>
Co-Authored-By: Shivanand Tendulker <stendulker@gmail.com>
Change-Id: I1534247bf207a20a7a58534988192aef392eaff2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to avoid a WARNING log such as:
WARNING ironic.conductor.utils [req-99809e85-2cc0-4948-8665-7c5d3f1e5b47
- - - - -] The set_power_state method of fake doesn't support 'timeout'
parameter.
WARNING ironic.conductor.utils [req-0062c24d-36b4-447e-8823-cf3cc43752b9
- - - - -] The reboot method of fake doesn't support 'timeout'
parameter.
Over and over in the log files, this patch is adding the "timeout"
parameter to the set_power_state() and reboot() methods of the fake
power interface.
Change-Id: I461e19c8552fe14bfa3e2c23f34bd37c83b8be22
|
|
|
|
|
|
|
|
|
| |
This patch updates the generic power interface to support SOFT_REBOOT
and SOFT_POWER_OFF. And also it introduces "timeout" optional
parameter for all power operations.
Partial-Bug: #1526226
Change-Id: I1c9bbd1f11f6a8565607c874b3c99aa10eeb62a5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to properly support booting and maintenance of
systems that boot from a remote storage device, we need an
interface to associate the driver with.
This commit adds a basic storage_interface and noop and fake
interfaces along with the appropriate handling for configuration
in the event that the driver list is blank, or is missing the
noop driver.
Co-Authored-By: Stephane Miller <stephane@alum.mit.edu>
Change-Id: Ib21eda88f207f18675c8580cd7fd37eab6fd70bf
Partial-Bug: #1559691
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to `BootInterface` [1], the `prepare_ramdisk` method must
receive 3 arguments (self, task, ramdisk_params) while `FakeBoot`
implementation receives only 2 arguments (self, task).
This cause a runtime error when one wants one to use `FakeBoot` driver
as a part of its own driver (for test purposes or in case of standalone
Ironic with static PXE configuration).
The reason why it works now is, no one use `FakeBoot` without other fake
parts, so `prepare_ramdisk` is never called.
[1]: http://git.openstack.org/cgit/openstack/ironic/tree/ironic/drivers/base.py#n416
Change-Id: I0a55bfaf8aa58747ad2cfcd14ec84430d139e68c
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, all node vendor passthru methods required an exclusive lock
on the node to validate and start the task. This allows node vendor
passthru methods to specify require_exclusive_lock=False in their
passthru decorators to let the conductor acquire a shared lock on a
node.
Change-Id: I43cf43bc5c17f44a735e16c3c5cb744cf6911d27
Closes-Bug: #1481665
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit introduces a new standard interface
of a driver - RAIDInterface. Drivers can
implement this interface to do RAID configuration.
This commit also introduces some common code to
do validation of RAID configuration and updating
the node after doing RAID configuration.
Change-Id: I907447511e6f9ee9e1e3b96a94a0360e81f75cef
Implements: blueprint ironic-generic-raid-interface
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
| |
This commit adds a new boot interface in Ironic
which can be used by deploy drivers to set up
the node to boot.
Implements: blueprint new-boot-interface
Change-Id: I0fdc0636c51a1b7803899dd09870806f1c81697e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enforces the rules E123, E126, E127, and E128 in the ironic
code base:
E123 - closing bracket does not match indentation of opening
bracket’s line
E126 - continuation line over-indented for hanging indent
E127 - continuation line over-indented for visual indent
E128 - continuation line under-indented for visual indent
This fixes any parts of the current code which fails these rules and
removes these rules from the tox.ini flake8 ignore list.
Change-Id: Ia96582b5e9abc088d6c1694afc93c59be4a4065c
Closes-Bug: 1421522
|
|
|
|
| |
Change-Id: I9c1717c386bc5587420d47f5b6e9d481e589cc2c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Adds two new fields to table ``nodes``.
2. Enable changes in conductor and api to execute
the methods for inspection.
3. Adds the default timeout `inspect_timeout` in
ironic.conf.sample file.
The new field 'last_inspected' has been renamed to
'inspection_finished_at' after discussion.
The ironic-client changes for 'inspect' to be
added to the list of node-set-provision-state valid
actions are being addressed by
https://review.openstack.org/#/c/148804
Implements : blueprint ironic-node-properties-discovery
DocImpact
Change-Id: If9aab90accf5a60ad3febbfc1f5d367eed987c13
|
|
|
|
|
|
|
|
| |
Adds the InspectInterface to the base and fake driver.
Implements: blueprint ironic-node-properties-discovery
Change-Id: I103433c9e4aee7dfa3bcc049e469c812162e9ac6
|
|
|
|
|
|
|
| |
Method should be more explicit than only having it via kwargs.
Closes-Bug: #1394470
Change-Id: I6a55e1be013629e22c384b968699980e83ae0cd3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update drivers VendorInterface validate() methods to remove the
verification of whether a method called exist or not. This verification
is now done by the conductor, validate() will always be called with a
valid method for drivers that are decorating their vendor methods with
the @passthru decorator.
Change-Id: Ia542df8283007ea2a2a049311a6418313a5859b4
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The @passthru and @driver_passthru decorators were extended to support
adding a description about the method being decorated which will also be
returned by the API. That said two new endpoints to the API that returns
the available methods for the given driver or node.
* GET /v1/drivers/<driver name>/vendor_passthru/methods
* GET /v1/nodes/<node uuid>/vendor_passthru/methods
Implements: blueprint extended-vendor-passthru
Change-Id: Idac6a433da1a9ae170dbe3d8ceb9e4c76fcdb1be
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extend the VendorPassthru and DriverVendorPasshtru endpoints
to support to any HTTP method.
When creating a new vendor function developers can specify which are the
HTTP methods supported by each vendor function as a list, if the method
request is not in the list Ironic will return a InvalidParameterValue
(HTTP 400, Bad Request), otherwise the method will be invoked and the HTTP
method request will be available to the vendor function as a parameters
in kwargs called 'http_method'.
Partial-Bug: #1382457
Implements: blueprint extended-vendor-passthru
Change-Id: I01d9d7fdd7eaf9849db41d50fbb4a78fd31bbfdc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extend the @passthru and @driver_passthru decorators to
add support to vendor to determine whether their methods should run
synchronously or asynchronously.
A new flag "async" was added to the decorators, if True (the default)
run the method asynchronously if False synchronously.
The RPC methods vendor_passthru() and driver_vendor_passthru() return
values were updated to also return the mode that the vendor method was
invoked. This is needed because the API should return a different HTTP
code depending on the mode, which is 202 (Accepted) for async and 200
(OK) for sync.
Before the driver_vendor_passthru() was always synchronously and the
vendor_passthru() asynchronously, this patch makes things more consistent
by supporting both modes on both endpoints.
Partial-Bug: #1382457
Implements: blueprint extended-vendor-passthru
Change-Id: I6e7f6c61e9933cba7411d4e9acca9dd8720e9bfe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each vendor class had to implement a custom method
to invoke their own vendor functionalities, the commit
e129faef1762b8335b226298554ed83204c2696a added a decorator @passthru()
to decorate those vendor methods and guarantee that the errors and
exceptions are being handled accordingly. This patch is extending that
decorator to add some metadata to each vendor method and from that be
able to generically build a way to invoke those without requiring vendor
drivers to implement a custom method for that.
The vendor_passthru() and driver_vendor_passthru() methods were removed
from the VendorInterface base class. Now vendors that wants to implement
a vendor method should now only care about implementing the method itself
and decorating them with the @passthru() or @driver_passthru decorator.
This patch also adds a backward compatibility layer for existing drivers
out of the tree that may be using the old [driver_]vendor_passthru()
methods. If the vendor class contains those methods we are going to
call them just like before, otherwise we are going to use the new
mechanism. All drivers in tree have been ported to the new mechanism.
Implements: blueprint extended-vendor-passthru
Partial-Bug: #1382457
Change-Id: I7770ccd9668d9c03e02f769aff7c54b33734a770
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the drivers' vendor_passthru are async. calls, any exceptions
raised by them won't be handled. So all exceptions, even non-Ironic
exceptions should be logged.
This patch adds a decorator that can be used to wrap passthru function
calls and ensure that any exceptions get logged correctly, also adds
unit tests to ensure decorators functionality.
Change-Id: I17006611fd59d5f4dc78fdaefdf802e9fb7caff2
Implements: blueprint extended-vendor-passthru
Closes-Bug: 1372979
|
|
|
|
|
|
|
|
|
|
| |
Fixes files with the PEP8 error:
H405 multi line docstring summary not separated with an empty line
and enables the PEP8 check in tox.ini.
Change-Id: I632c89e2a1783be8305a8a8cea7ae9d3bb55b62c
|
|
|
|
|
|
|
|
|
|
| |
Now that ironic supports oslo.i18n, using the install function to
inject _ into the builtin has been deprecated. New i18n common module
used instead. In one module _ was imported from gettextutils, now
also changed to i18n import.
Closes-bug: #1346406
Change-Id: I672a975d479991982c24031e834a26e2c2811890
|
|
|
|
|
|
|
|
| |
There are several functions that were raising InvalidParameterValue,
when it should be a MissingParamenteValue. This way we can differentiate
both exceptions when needed.
Change-Id: Ia5ce05e30b3fb00261854857aeef46238a8b00f8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch will define the sensor data collection interface and implement
a driver based on IPMI to collect sensor data and send them to Ceilometer.
The change covered by this patch:
1. Creates a new ironic.driver.base.ManagementInterface common method
*get_sensors_data* for gathering hardware sensor data.
2. Implements the interface into 'ipmitool' driver to gather data via IPMI
command call.
3. Adds periodic task to conductor which emits notification to Ceilometer by
an interval.
Spec: https://review.openstack.org/102435
Change-Id: I2c072321a662db0162c938b7d4f3b59ba07d4e08
Implements: blueprint send-data-to-ceilometer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds ironic.drivers.base.BaseDriver.get_properties() which returns a
dictionary of <property>:<description> entries.
The driver interfaces (DeployInterface, PowerInterface, ...) have a
new get_properties() method that returns a dictionary of
<property>:<description>.
These changes are needed in order to provide an API to get driver_info
properties.
Change-Id: I5994e990deb26841633ca26de1a5fb63b743271a
Blueprint: get-required-driver-info
Partial-Bug: #1261915
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's common for drivers to be able to set the boot device only for the
next boot (that's the default behavior for the IPMITool for example)
but it's also possible to set a boot device as persistent so that the
configuration will persist across multiple boots. This patch is making
the 'persistent' parameter to be part of the method signature of the
set_boot_device() method and also making the get_boot_device() method
to return whether the device is set as persistent or not as part of
the response.
Implements: blueprint new-management-interface
Change-Id: Ia1f9c5449612871a379377d11fb0fe91b0958026
|
|
|
|
|
|
|
|
| |
The 'fake' driver is not returning any status from driver.deploy or
driver.tear_down, which prevents the completion of a provision state
transition with this driver.
Change-Id: I844dc03f35da23eb81235abdc16a79afc9835235
|
|
|
|
|
|
|
|
| |
The node parameter is redundant since the node object is an attribute
of the task object.
Closes-Bug: #1312632
Change-Id: Ia4193ea561a31e54754049d9964c6c9021474caf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the driver interface's validate(), eg pxe.VendorPassthru.validate()
returns True. The expected behaviour is for them to raise an exception if
validation isn't successful, or return nothing if validation succeeds.
This is fixed.
The docstrings for the validate functions in the base class have been updated
to mention that they should return None.
Change-Id: Ic8fb626874ed6cb11494c84dc184d70686441b0f
Closes-Bug: #1288363
|
|
|
|
|
|
|
|
| |
The node parameter is redundant since the node object is an attribute
of the task object.
Partial-Bug: #1312632
Change-Id: Ic7bf898b7d881e36188511d75837e450f29f066c
|
|
|
|
|
|
|
|
| |
The node parameter is redundant since the node object is an attribute
of the task object.
Partial-Bug: #1312632
Change-Id: I4baa8526768a250e0cf047f56322039157772376
|
|
|
|
|
|
|
|
|
|
|
|
| |
The node parameter is redundant since the node object is an attribute
of the task object.
In the PXE driver, the helper functions _create_token_file,
_remove_internal_attrs, _update_neutron and _create_pxe_config were also
updated removing the 'node' parameter from the function definition.
Partial-Bug: #1312632
Change-Id: I82b3078c00cdf6e417c3f379bf03f1c5cae533d7
|
|
|
|
|
|
|
|
| |
The node is redundant since the node object is an attribute of the
task object.
Partial-Bug: #1312632
Change-Id: I14f921023d020eb5a0b8caf1b3c5fa6f248b9ff6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new driver ManagementInterface for management related actions,
the new interface contains the following methods:
* validate() - To validate driver-specific management information. (E.g
if the node has the right credentials already set)
* set_boot_device() - To set the boot device for a node.
* get_boot_device() - To get the current boot device of a node.
* get_supported_boot_devices() - To get a list of the supported boot
devices by that driver.
A new file common/boot_devices.py which contains the standardized names
for the acceptable boot devices, the names are based on the IPMITool
names (the default power driver). The idea is that clients won't need to
know the specific boot device names for each driver, drivers which have
different name options than the IPMITool have to translate it internally.
As part of the work to add tests to the FakeManagement interface, other
tests in test_fake.py were modified in order to remove the DB calls.
blueprint: promote-set-boot-device
Change-Id: If2e8074f2e0fbcf962d224024347a0319ac174cf
|