This ensures the options for oslo.versionedobjects library are
included in the file generated by oslo-config-generator.
Change-Id: Ib63c4dd1c14905ec200e67a8fe9ba5f20b160b08
On some hardware, supportedApplyTime attribute may not be listed
under Redfish BIOS settings URL. This patch adds handling of this case
to prevent failure on attempt of updating BIOS settings.
Change-Id: I40359973fd832146cb2b179bfa447a308078e83d
Adds support for SHA256 and SHA512 checksums to be passed
to firmware upgrade steps for the ilo hardware type.
Change-Id: I5455c4bfa4741a35b0ddada37298c897887e6cea
We've discovered we can deadlock on allocations, and reviewing
the code of both the test and the underlying db, it is sort of a
"multiple things contribute scenario", but first up here is to
streamline the allocations update process so we re-query after
closing out the transaction.
Change-Id: I46e78813787703819a61f69d4243271ec07e0983
Partial-Bug: #2028866
Somehow, missed adding a test for this early on, while working on
validating the API client changes, I discovered that we seemed to
be missing unit tests for the method, because I couldn't get it
to work for the client, but then I realized I was just mixing
the nature of use up. C'est la vie!
Change-Id: I382ad3a011f3151abedb896f58c75e8b76b357fa
Adds a wait step to allow for finer grained workflows
and forcing interruptions which may be needed in some
cases with specialized hardware.
Change-Id: Idc338b761ebe35a4635022a324ca5acbf29fc462
Ramdisk and anaconda deploys share image processing by
ironic.common.pxe_utils.get_instance_image_info(). This method
unnecessarily processes ks_template property when ramdisk
deploy is in use, and by itself calls _get_image_properties()
which requires image_source property to exist.
For ramdisk deploy it is enough to have kernel and ramdisk.
This patch adds conditions to process ks_template property only
for anaconda deploy.
Change-Id: I5f88d3b1da1c17bc26d49370cc6ce74644d13679
logging has a method debug, and a static variable DEBUG, which are entirely
different. Tenacity requires the integer value which is passed in for logging
actions.
This is rooted in the examples published on tenacity logging, since the lower
level caller doesn't log in many cases, and our testing didn't catch this precise
case because we were only validating that logging was called, not that logging
worked. We also didn't see any of the errors related to CI resource
contention being lessened when the patch was running, and many of the chances
of lock conflicts being reduced in other fixes.
Duplicates the retry test *without* the logging mock, as not mocking the logging
would have yielded the break.
Change-Id: I4a65a044e90aff3cffae24f191e425bc75b5fb74
Adds a database retry decorator to capture and retry exceptions
rooted in SQLite locking. These locking errors are rooted in
the fact that essentially, we can only have one distinct writer
at a time. This writer becomes transaction oriented as well.
Unfortunately with our green threads and API surface, we run into
cases where we have background operations (mainly, periodic tasks...)
and API surface transacations which need to operate against the DB
as well. Because we can't say one task or another (realistically
speaking) can have exclusive control and access, then we run into
database locking errors.
So when we encounter a lock error, we retry.
Adds two additional configuration parameters to the database
configuration section, to allow this capability to be further
tuned, as file IO performance is *surely* a contributing factor
to our locking issues as we mostly see them with a loaded CI
system where other issues begin to crop up.
The new parameters are as follows:
* sqlite_retries, a boolean value allowing the retry logic
to be disabled. This can largely be ignored, but is available
as it was logical to include.
* sqlite_max_wait_for_retry, a integer value, default 30 seconds
as to how long to wait for retrying SQLite database operations
which are failing due to a "database is locked" error.
The retry logic uses the tenacity library, and performs an
expoential backoff. Setting the amount of time to a very large
number is not advisable, as such the default of 30 seconds was
deemed reasonable.
Change-Id: Ifeb92e9f23a94f2d96bb495fe63a71df9865fef3
When debugigng the logs, it is sort of difficult to know when
actions complete for a specifc periodic task.
Example: Power sync, which includes an explicit sleep(0) to
yield control. The explicit sleep *is* important as it is
a low priority task. Where this quickly mixes things up
is when we're hunting database locking issues, and we
*must* verify that we *have exited* part of the code
completely.
Change-Id: Ie9eddedf6bca603845ff14e1ccbda665e3b9e5bd
Disables internal heartbeat mechanism when ironic has been
configured to utilize a SQLite database backend.
This is done to lessen the possibility of a
"database is locked" error, which can occur when two
distinct threads attempt to write to the database
at the same time with open writers.
The process keepalive heartbeat process was identified as
a major source of these write operations as it was writing
every ten seconds by default, which would also collide with
periodic tasks.
Change-Id: I7b6d7a78ba2910f22673ad8e72e255f321d3fdff
The versions only differ in the first paragraph, and the supposedly
common parts actually have different code paths for different distros.
Also be realistic about which distros we support.
Change-Id: Ifcc19a20d42f384300cadf442951739be8682047
Adds the logic and testing to handle vendor interfaces to be able
to be called as steps, as well as adds the ipmitool send_raw
vendor passthru method to be able to be called as a step.
Change-Id: I741a4173f1d150298008d3190e4c3998402a8b86
Currently, there's no information printed about the style of failure
when we cannot properly change the power status on an iLO server. Now,
we ensure the actual server state and the expected server state at the
BMC level is logged, helping with troubleshooting edge cases.
Related-bug: 2021995
Change-Id: I77dc69ef4dd42e5ad674f5c00a4500027ef030ec
Only port creation/updating/deletion logic has been replicated from
ironic-inspector, as well as the add_ports and keep_ports options.
In the future patches, the added code will become a part of processing
hooks.
Change-Id: I69d6a1a53c5bf9e0f41d1a5bce7215edeea54b22
No real inspection is done: it only accepts data and returns success.
Common code has been extracted from the existing inspector-based
implementation.
Change-Id: I7462bb2e0449fb1098fe59e394b5c583fea89bac
An issue previously existed where periodics would cause an open
transaction to exist with the database which would cause issues
when attempting to write to the database.
This issue has been fixed by assembling the data to return to
the calling method, such that an open transaction does not
remain, by copying the data retrieved from the database,
thus disjointing it from the transaction.
Closes-Bug: #2027405
Change-Id: I6401193b04fd3be78c37433bfdd0ccbd92aac8da