Currently, service steps do not work with virtual media deployments
because states.SERVICING and states.SERVICEWAIT are missing from the whitelist
of valid provision_states. This change resolves this issue.
Change-Id: I5e3ec08d128b35385f2d90c9c852140b757b8dbf
First, the *_by_arch options are not a replacement for plain options:
the cpu_arch property is neither required not standardized. This is why
older options with *_by_arch equivalents are not deprecated.
Second, the example in the documentation is wrong: oslo.config does not
use Python dictionaries. Which makes me suspect that the feature has
never been properly tested (indeed, it's not used in the devstack CI,
and Bifrost uses the older options).
Change-Id: If1e633930909ce9d80e14f3ec3daa0bf8d48b7f0
Introduce config to allow setting default ramdisks per-architecture.
The hierarchy of the parameters is:
Node config > config by architecture > general config
Change-Id: I95dfece3e8f7bcd3121ac808985cb61997877a51
Adds inspection hooks in the agent inspect interface for processing
data received from the ramdisk at the /v1/continue_inspection
endpoint. The four default configuration hooks 'ramdisk-error',
'validate-interfaces', 'ports' and 'architecture' are added.
(The remaining inspection hooks will be added in further patches.)
Change-Id: I2cf1be465ba7a93fd66881b14972e960acd4dd4e
Story: #2010275
It may be convenient to use [pxe/redfish/...]kernel_append_params as
the universal defaults, while using {driver,instance}_info to only
append values. This change allows that by replacing %default% with
the value of the applicable configuration option.
An example use case: CoreOS requires an additional artifact (root
filesystem URL) when PXE booting.
While here, fix the PXE/iPXE interface documentation.
Change-Id: I829291ab5cc19ec2ca43bc45815d012697f0b408
Node can be in CLEANWAIT or DEPLOYWAIT during async step
handling when it needs another reboot. Without this change
node fails to boot back to IPA.
This unifies all occurrences and create utility method for
reuse. All occurrences are aligned to have the same set of
states in case they are needed in future.
Change-Id: I685c5827a70df4abb358635d89b86894671ac493
This change switches driver utility and base classes to using
set_driver_internal_info, del_driver_internal_info,
timestamp_driver_internal_info node methods for modifying
driver_internal_info.
Specific drivers with switch over later in this series.
Change-Id: I4bdfe447cb4636f3f9efad3f2cb17ebddcacce4b
Generic fields, such as deploy_{kernel,ramdisk,iso) and bootloader
should not have vendor prefixes. This patch removes them from
the iLO boot interfaces with deprecation.
Also clean up the code a bit for less repetition.
Change-Id: Ib23203fa01837ee96f8a38ab50fa8252334c8cb8
Story: #2008880
Task: #42430
We should only use prefixed driver_info parameters when they are either
unique to the driver or have different meanings for different drivers.
This is not the case for deploy_iso, but we use vendor prefixes for
historical reasons.
This change migrates the redfish-virtual-media boot interface and
creates helpers to fascilitate migration of other boot interfaces.
Change-Id: I698d1c90592e8de2cb24d6e2cf819e7f6ac3911f
Story: #2008880
Task: #42425
Currently handling of kernel_append_params is very inconsistent. This
change applies a straightforward process:
1. instance_info[kernel_append_params]
2. driver_info[kernel_append_params]
3. [pxe]kernel_append_params (renamed from pxe_append_params).
Also adds a helper for subsequent fixes in other drivers.
Change-Id: I79bcf4d8ef1f0f55a82e0991dd5bb1685b3f7957
Story: #2008902
Task: #42469
Utilities moved to ironic.common.molds.
New config section [molds] created and settings moved there.
Change-Id: I1177f7dd5d5157bb3a5c0bd09acd75c9a394ab47
For some (likely historical) reasons we only use it for PXE and iPXE,
but the same logic applies to any boot interface (since it depends
on how the management interface and the BMC work, not on the boot
method). This change moves its handling to conductor utils.
Change-Id: I948beb4053034d3c1b4c5b7c64100e41f6022739
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: Ib546f16965475c32b2f8caabd560e2c7d382ac5a
Look for boolean and string like booleans in driver_info['ipmi_force_boot_device']
to make setting the option more user friendly / less error prone.
Change-Id: I2917761055db5286183ce265089c19dea98947ad
Story: 2004444
This commit adds support to perform Smart Update Manager (SUM)
based firmware update as an inband manual clean step
`update_firmware_sum` for iLO drivers.
Closes-Bug: #1648448
Change-Id: I581d5bc535420d4493394d16cf6cc2bb0ddeb8f7
ironic collects ramdisk logs from agent, and save it to
/var/log/ironic/deploy.
The time stamp part of log filename is formatted as '%Y-%m-%d-%H:%M:%S',
as an example:
7b52d13a-9372-448d-9252-fffbaf2db942_1fb52a75-04b6-4c73-80c4-\
8d49dc30f650_2017-07-06-09:03:18.tar.gz
The colon is not handled properly by tar, it fails to untar a file
with colon in file name.
This patch provides a workaround by changing colon with dash in time
stamp.
Closes-Bug: #1702672
Change-Id: I1d60939768ffa75de050aa309a3203de553ae877
Log messages are no longer being translated. This removes the use of
_LE, _LI and _LW translation markers from ironic/drivers.
Change-Id: Ie01c1a6a0e0232dce055767854a5d4385b392510
Partial-Bug: #1674374
This patch replaces python standard base64 library call to
oslo_serialization.base64 to follow OpenStack Python3 porting
standard [1], since the requirements.txt has already defined
oslo.serialization>=1.10.0.
[1] https://wiki.openstack.org/wiki/Python3
Change-Id: I148778ebcccecdb04824c6982b184400ec189084
Swiftclient passes header values straight through to requests, which
recently started enforcing a long-documented requirement that headers
be byte- or unicode-strings. While the Swift community decides whether
and when to str() header values vs. raising an error [1], let's
explicitly cast what we know to be ints to strs as that should *always*
work.
[1] This is a bit more complicated than it seems at first glance;
see the discussion around the requests change for details at
https://github.com/kennethreitz/requests/pull/3366
Change-Id: Ic52a68365dc08db055f776ec8d48f7bf44d6b80d
Related-Bug: #1614932
This patch adds the code to collect the deployment logs from the IPA
ramdisk. The logs can be collect for every deployment, upon a failure or
never. By default, logs are collected upon a failure.
After collection, logs can be storaged either in the local filesystem
(default) or in Swift.
If an error occurs when the logs are being collected, storaged or if the
ramdisk does not support the collect_system_logs command Ironic will log
an error message, but the deployment will proceed.
Documentation on how to enable and other configuration will be done on a
subsequent patch.
Partial-Bug: #1587143
Change-Id: I6da1110daa94ea25670f71f9862e51cc9bbc6f93
This function is going to be used by out of tree drivers.
To avoid code duplication make it available from Ironic's tree
Change-Id: I12211db38a3fdb3b2d733e5769f2c052c32c4a75
LOG.warn is deprecated. It still used in a few places. This updates
those one to use the non-deprecated LOG.warning instead.
Closes-Bug: 1508442
Change-Id: Id947e4c8ae9894f480192a5ab034c24c25125788
This driver that will promote integration between Ironic and the HP OneView
Management System. The driver will allow Ironic to borrow non-dedicated servers
from OneViews's inventory to provision baremetal instances with minimal common
pre-configuration, set through OneView's *Server Profile Templates*.
Co-Authored-By: Alberto Barros <albertoffb@lsd.ufcg.edu.br>
Co-Authored-By: André Aranha <afaranha@lsd.ufcg.edu.br>
Co-Authored-By: Caio Oliveira <caiobo@lsd.ufcg.edu.br>
Co-Authored-By: Diego Pereira <diegolp@lsd.ufcg.edu.br>
Co-Authored-By: Gabriel Bezerra <gabrielb@lsd.ufcg.edu.br>
Co-Authored-By: Lilia Sampaio <liliars@lsd.ufcg.edu.br>
Co-Authored-By: Sinval Vieira <sinval@lsd.ufcg.edu.br>
Change-Id: Ic2fb7860e6b4f5183b6525ff7709c7616350a96a
Implements: blueprint new-ironic-driver-for-oneview
Depends-on: I914596e592477e148e642f93cfbe114464c3fe38
Improve the ability to resolve capability value if user input
unexpected but correct value to become more robust.
Resolve the multiple values:
User might input multiple values like
'capabilities': 'cap1:value1, cap2:value2'
This is not subject to the format of "k1:v1,k2:v2" but should be
accepted.
Depends: Ibfee071e7cc3226440f2e860ddf7b759527657c9
Change-Id: Ie52291a260a5a04279c4f21e52961226282c450b
If the server ipmi does not support the command 'chassis bootdev'
with 'persistent' option', the boot device cannot be set persistently
and will not be set for the 2nd boot. This change proposes to add
a new parameter in node's driver_info to force set the boot device for
each power on.
Change-Id: I8d70c6292e3e013ccaf90f9ce4a616c8c916fe64
Closes-Bug: #1407820
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
iLO drivers overwrite boot_mode in the node's properties/capabilities
when UEFI secure boot is requested.
Closes-Bug: 1436791
Change-Id: I9b6cf288b34707a8a1d5d99a95f2bc9f6bf380f1
Ilo drivers sets capabilities:boot_mode in node properties
if there is none.
For a node capable of booting in both bios and uefi, setting
of this property by driver prevents it from getting selected for
future deploys requests for other boot mode.
It would be selected only for deploy requests where flavor
extra_specs specifies capabilities:boot_mode with a value
matching with one set by driver in the node properties.
Closes-Bug: 1418327
Change-Id: I90571487840c6a74699a8fbfbac8035c3efb5672
This patch implements common code for secure boot support for iLO
drivers.
Implements: blueprint uefi-secure-boot
Change-Id: Iaaae1549f656f2abb9f8d80e1756d027893b6671
This patch implements the part that reads the specified boot_option in
the node.instance_info['capabilities'] that have been passed to Ironic by
the Nova Ironic Driver and pass that information to the deploy ramdisk
by adding it to the kernel cmdline in the PXE configuration file that
will be generated to that node.
This patch also makes sure that we clean the PXE configuration files for
the node marked to local boot after it's deployed, so that any attempt
to boot it from the network will not work.
This patch only apply to the pxe_* drivers, because the blueprint is
about adding local boot support for deployments that uses partition
images. The agent driver right now supports full disk images only.
Implements: blueprint local-boot-support-with-partition-images
Change-Id: Ide08e2b41dcf74c69dfbce242112da701fa15187
Each vendor class had to implement a custom method
to invoke their own vendor functionalities, the commit
e129faef17 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
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
The names of parameters in docstrings should not have leading astrisk
characters, because it confuses the rST parser.
Change-Id: I8c3574b03903a23c10ef2afcb793c6766a486007
Partial-Bug: 1277282
Now all RPC objects already have a context embedded within them so we
can ignore the context parameter on the refresh() method (it was the
last method using this parameter). This patch also:
* Update the Docstrings from the @remotable methods to let the user know
that the context parameter is not being used. The @remotable decorator
still requires that the method it's decorating have a context as it's
first argument, but that's going to change in the future.
* All code and tests were updated to not pass the context to refresh(),
save() and destroy() methods.
Closes-Bug: #1314732
Change-Id: Ibb338b909d99862ae048d605e66b8831d8c2128d
Changes to elements in existing node.properties dictionary will not get
saved to database by node.save(context) method. The properties dictionary
needs to be replaced by a new one to get the changes to be saved in the db.
Change-Id: I3bb65d00e141aedcb1278c1a700d12c9b29f7232
Closes-bug:#1371816
The following functionality need to be added in iLO driver:
- Add set_boot_mode function to iLO driver to switch between
bios and uefi boot modes.
- Validate boot_mode for IloVirtualMediaIscsiDeploy driver.
Change-Id: Ic8496a2d97aab6634b573c85d379b446c49e04b9
Implements: blueprint uefi-boot-for-ironic
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