Because of the way validation works, the ramdisk deploy interface
currently requires an image_source in addition to kernel/ramdisk.
After 1d6441cc347cfe984721f34ebb0cd64fd9e4d876 it is no longer
necessary, and this change removes this requirement.
Change-Id: I59996fac059dade0ef186598be1e8971e073eb04
This function has a confusing public interface and is always preceeded
by roughly the same logic, copy-pasted across boot interfaces. Move
this logic inside of the function and streamline its interface.
Change-Id: I4fc63be4e3cd4656d0ca7e893d4f3a98c07a8b4c
Avoid processing non-RAID controllers as they cannot be
used for RAID operations to save some time and requests
and avoid possible errors later if non-RAID disks
are picked up for configuration.
Related to: I369bdbb17064baf34f90e864d0ece600529de509
Change-Id: I728f03dc829fb76cad9804c8f8df20810307ce2c
The parameter has not had any effect in the code since
the dual stack PXE work went into place with Ironic as options
are now generated and transmitted to Neutron for both IPv4 and
IPv6. This option is only used by the internal
``dhcp_options_for_instance`` method in
``ironic.common.pxe_utils`` as a fallback if the calling method
does not specify a version. However a later change resulted in the
default behavior calling the dhcp option generation explicitly
to generate both IPv4 and IPv6 parameters, making the option
entirely redundant.
Third party drivers using the ``dhcp_options_for_instance`` method
should consider generating options for both IPv4 and IPv6 at all
times. See change
If7a296001e204ae0c9a49495731052ab33379628 for examples on how
to do this.
Change-Id: I343783389105f008ce6dafc8d25d93211710771a
oslo.db 9.1.0 extends capabilities to handle changes
in duplicate key error information introduced since
MySQL 8.0.19 and fixes issue arose during inspection
of node created with idrac driver, inspect interface
as idrac-redfish.
Story: 2008901
Task: 42468
Change-Id: Ic18e485d4eb14566554d25379a719669ac362d70
Fixes an issue of powering off with the ``idrac-wsman`` management
interface while the execution of a clear job queue cleaning step is
proceeding.
Prior to this fix, the clean step would fail when powering off a node.
Story: 2008988
Task: 42641
Change-Id: Ib4ab755c806f028d97379b80a8c27d6ade63cba1
This change modifies the nodes _get_nodes_collection method to
consider and pass in an explicit lisst of requested fields into
the node list method, while also including the required fields
for things like ownership/policy checking.
And slightly modifies node_convert_with_links method to simplify
it while enabling field validity to be checked, and specific
requisite field lists provided in based upon that value.
And also optionally builds the traits list as they are nolonger
*always* populated on all objects with fully populated objects
as only partially hydrated objects are provided back when specific
fields are requested.
Story: 2008885
Task: 42572
Change-Id: Ided419263d84184cab902944b6c518f98618c9d2
Prior to this change, ironic would not pass the API consumer request
for a list of nodes down to the underlying layers with the list of
specific fields being requested.
This resulted in full objects being returned from the database where
in essence the entire database would be downloaded to construct the
objects, and in the case of joined views, whole roles would largely
be duplicated.
In order to be more efficent, we need to hand the user desired
fields down to the database, in order to return only that data,
and thus transform it.
In this case, we already have testing that handles the conversion
of objects at the lower layer, and in this case, the db object
conversion handler already understood fields, so we're just kind
of completing the awareness further downward for increased efficency.
This change only sets the stage, the final change to this is aligned
with API change to leverage this as the API is coded such that the
field does not include all of the required fields needed by the API
to render replies, which is fixed in the API patch to leverage this
with the API.
Story: 2008885
Task: 42495
Change-Id: I6283c4cc1b1ff608c4be24a6c41eb7b430a5ad68
A node object has many fields, and a huge opportunity
for performance improvement is to reduce the amount of work
performed at the lower layers when it is not necessary.
In particular, the easiest case to identify and handle is
when a list of fields to be fulfilled is explicitly supplied.
This is particularlly noteworthy when we collecting a list of
nodes for synconization with Nova, where only 9 columns are
really needed to supply Nova with the information required,
and thus numerous fields are discarded.
This is all particularlly compounded when traits are used,
which presently uses a joined load pattern from SQL.
With this patch, we explicitly load and convert only the fields
requested at the lowest level, and then perform a different style
of loading node traits which requires less overhead by SQLAlchemy
to de-duplicate the returned result set to the application.
This turns out to be far more efficent as we're reducing the amount
of data/object conversion work by 360%, even before we consider
populating traits, which is performed as a separate query when
traits are requested.
Story: 2008885
Task: 42434
Change-Id: Iac703d2a9b7b240a47477be8a64c7c33e28f692f
In order to avoid potential cache coherency issues
when using a globally cached AgentClient, e.g. with
TSL certificates from the IPA, cache the AgentClient
on a per task basis.
Co-Authored-By: Arne Wiebalck <arne.wiebalck@cern.ch>
Story: #2009004
Task: #42678
Change-Id: I0c458c8d9ae673181beb6d85c2ee68235ccef239
The bootloader default for ipxe, previously set to ipxe.efi
was, while consistent with the interface naming, a likely
setting that had to be overridden by most deployments,
as very little hardware can make use of ipxe.efi for network
booting, where as snponly.efi is realistically what should
be used in nearly all cases with the exception of some
extremely early UEFI supporting hardware, which may
happen to work with ipxe.efi *if* support for the network
card happens to be compiled in.
Note: This was likely never observable in CI as CI leverages
firmware with integrated iPXE binaries.
Change-Id: I808cf92c98339aa447b4799900066c310e15fd5b
The function does more than just validating that the image exists.
This change simplifies further refactoring of image validation.
Change-Id: I9a3dc7ddabde38faa77a2c4bc7bf5db750a7f4d8
Because of using 'or', it will only be respected when verify_ca
is also False in the configuration.
Change-Id: Ie000463fa8ac2cd739a9d8f256346472fe3f4288
The current ramdisk deploy code expects a user to set the boot_option
capability to "ramdisk". Not only is it redundant, it's also not
documented, so chances are high nobody has ever done that.
As a side effect of e6bb99cd8ff94a24c3f2108e649c7ca39189d220 boot
interfaces no longer validate kernel/ramdisk/image if boot option
is "local". Unless a user explicitly sets boot option to "ramdisk",
the validation will be skipped for the ramdisk deploy.
This patch follows the pattern of the anaconda deploy and makes
get_boot_option always return "ramdisk" for the ramdisk deploy.
In the future we need to refactor this code so that the deploy interface
provides the boot option it works with, but that is a lot of changes.
Change-Id: I25c28df048c706f0c5b013b4d252f09d5a7e57bd
No need to output the whole step structure, especially if it has
arguments. Also no need to repeat "deploy".
Change-Id: I06275fe894ee24638dca9bb8c78844ff3ca3d29b
The instance_uuid handling on the detailed node information
endpoint of the api (/v1/nodes/detail?instance_uuid=<uuid>),
which is used by services such as Nova for explicit node status
lookups, previously had special conditional logic surrounding it
which skipped the inclusion of the API requestor project-id, from
being incorporated into the database query.
Ultimately, this allowed an authenticated user to obtain a partially
redacted node entry where sensitive informational fields were scrubbed
from the response payload.
With this fix, queries for an explicit instance_uuid now follow the
standard path inside the Ironic API to the database which includes
inclusion of a requestor Project-ID if required by configured policy.
Change-Id: I9bfa5a54e02c8a1e9c8cad6b9acdbad6ab62bef3
Story: 2008976
Task: 42620
Generic fields, such as deploy_iso, should not have vendor prefixes.
This patch removes them from the iRMC boot interfaces with deprecation.
Change-Id: Ie24de1893395dca0e2dc4a57a42916f075d29ce6
Story: #2008880
Task: #42431
The original model used was to assert is_admin on the object context
which was actually used in only one place in ironic's code. Redudnantly
of course.
This is an excess call of is_admin on all API invocations, and is
simply not necessary as individual calls have API policy checking
and is_admin was only being consulted in the glance service utils...
However, the glance service utils also confirmed it should be able
to access glance if there was an auth_token present on the request
which should also always be the case. This was somewhat identified
as redundant/possible bug during the Wallaby cycle and appears to
be fine to remove
This does *not* remove the deprecated rule. At present, it appears
that rule may not be removed until after Xena.
Change-Id: I5a176f51db93d2a2238496f6955c1c7d9a79c548
We need a simple "how to reach out to us" page that is not mixed with
code contribution guide. This change adds it by moving information
around and polishing it a bit.
Change-Id: I0a458c3baddaaa2226cd2105d6325025a0c81f05
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