summaryrefslogtreecommitdiff
path: root/ironic
Commit message (Collapse)AuthorAgeFilesLines
* Fix compatibility with oslo.db 12.1.0Stephen Finucane2022-09-081-1/+3
| | | | | | | | | | | | | oslo.db 12.1.0 has changed the default value for the 'autocommit' parameter of 'LegacyEngineFacade' from 'True' to 'False'. This is a necessary step to ensure compatibility with SQLAlchemy 2.0. However, we are currently relying on the autocommit behavior and need changes to explicitly manage sessions. Until that happens, we need to override the default. Change-Id: I9e095d810ff5398920e8ffd4f2f089d9b8d29335 Signed-off-by: Stephen Finucane <sfinucan@redhat.com> (cherry picked from commit 74795abf2ff972b2b848eee98426bcdfee2a9c20)
* Merge "Update raid_type handling for Redfish raid_config" into bugfix/20.2Zuul2022-09-022-1/+28
|\
| * Update raid_type handling for Redfish raid_configAija Jauntēva2022-08-102-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix indentation for case when raid_type is missing. Generally, it is not expected that raid_type will be missing, this is done as a precaution as raid_type was introduced in Redfish 1.3.1. Now log warning that raid_type is missing, thus cannot update raid_config correctly. Followup to I753c4b00c0a64bcdc89c9bc0afd46f1211f7847b Change-Id: Id66b87309dd26a2a165b35ac1d81580e4605d629 (cherry picked from commit 3a621e3983eb2eb1d013d687acc3f5981cdfbc64)
* | Merge "Fix Redfish RAID to update raid_config" into bugfix/20.2Zuul2022-09-022-5/+153
|\ \ | |/
| * Fix Redfish RAID to update raid_configAija Jauntēva2022-08-102-5/+153
| | | | | | | | | | | | | | Story: 2003514 Task: 41940 Change-Id: I753c4b00c0a64bcdc89c9bc0afd46f1211f7847b (cherry picked from commit 29364b7fb40327dc277c535e5b829133274ad420)
* | Merge "Modify test code to avoid CONF modification affection" into bugfix/20.2Zuul2022-08-319-133/+132
|\ \
| * | Modify test code to avoid CONF modification affectionVanou Ishii2022-08-109-133/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Few unit tests change attribute of CONF variable via Python assignment. This changes attribute of CONF, which is instance of XxxOpt class defined in oslo_config, to Python literal value. This affects result of another unit test. To avoid this, we should change attribute of CONF variable with set_override method. Change-Id: I4bd8b1b4ea974834f1149fcaa79de85d24f5f7d1 Story: 2010214 Task: 45956 Depends-On: https://review.opendev.org/c/openstack/ironic/+/852253 (cherry picked from commit 3b28d0984d5eb82320c632dd5840cebf6d0762ad)
* | | Improve error message heuristics with jsonschema>=4.8Dmitry Tantsur2022-08-302-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before version 4.8, jsonschema did some wild guessing when producing error messages for schemas with several equivalent subschemas. In version 4.8 it is no longer done, causing error messages that are more correct but also more generic. This change restores guessing the potential root cause without claiming that it's the only possible root cause. Also the traits schema is simplified to make it less ambiguous. See https://github.com/python-jsonschema/jsonschema/issues/991 for details. Change-Id: Ia75cecd2bfbc602b8b2b85bdda20fdc04c5eadf4 (cherry picked from commit 62f9c61ae6657227fd1f5dbc86c59a22b6bac28f)
* | | redfish: fixes usage of ValueDisplayNameDmitry Tantsur2022-08-262-8/+13
| | | | | | | | | | | | | | | | | | | | | It's spelled this way, not DisplayValueName. Change-Id: I170d78bdb7ed0f6c36a80a9f2ceb9629f44394ed (cherry picked from commit 9f1f58c6af3aabcb3ae56e5f7b292f07e81e2864)
* | | Do not reboot into nowhere after BIOS settings with fast-trackDmitry Tantsur2022-08-173-24/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the prepare_ramdisk implementation of the redfish-virtual-media boot interface skips configuring an ISO in fast-track mode. When rebooting after BIOS/RAID settings changes, we need to enforce the correct ISO configuration. Change-Id: Ibdfe0775065f3b27478305dd18929a291df3ee3c (cherry picked from commit 89f421b166915a22626dcb919382ce13f4588973)
* | | Merge "Change molds option to appropriate class" into bugfix/20.2Zuul2022-08-101-2/+2
|\ \ \ | |/ / |/| |
| * | Change molds option to appropriate classVanou Ishii2022-08-101-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | At current, retry_attempt & retry_interval in ironic.conf [molds] is instance of StrOpt. However it should be IntOpt class. If it remains to StrOpt class, tenacity.retry wrapper in common/molds.py will fail with TypeError. Change-Id: Iafedf2ec0326009585c1cac251ecae65c9e666ac Story: 2010215 Task: 45957 (cherry picked from commit 35bc014ed94ee0c78ee8d44113fcea721f0c1af0)
* | Log successful clean up in image cacheDmitry Tantsur2022-08-101-0/+11
|/ | | | | Change-Id: I6c53192b69a7b433b2758aa9374cd10b20191af7 (cherry picked from commit e48c62187ca15e130c35b421e5e311eea9a334db)
* Fix compatibility with jsonschema>=4.0.0Dmitry Tantsur2022-07-283-2/+3
| | | | | | | | | | Specify the schema version for network_data and node, otherwise the latest one is used. Also fix one test where the error messages was changed. Change-Id: I4a614d7e73348bbe6c355a40881b013cbfe00b03 (cherry picked from commit 55b9579f14ea08a2dc732336d8f552cc14ab895d)
* Fix redfish-virtual-media for newer iDRACsAija Jauntēva2022-07-043-15/+57
| | | | | | | | | The issue with standard Redfish virtual media boot has been fixed now. Update to restrict use of redfish-virtual-media based on iDRAC firmware version. Change-Id: I8ead1d24a9bd502b64fe7dd058e77550fcee141c (cherry picked from commit 73040c88d99f066644277f32e86d196305fc8596)
* No deploy_kernel/ramdisk with the ramdisk deploy and no cleaningDmitry Tantsur2022-06-276-14/+54
| | | | | | | | | | Ramdisk deploys don't use IPA, no need to provide it. Cleaning may need the agent, so only skip verification if cleaning is disabled. Other boot interfaces may need fixing as well, I haven't checked them. Change-Id: Ia2739311f065e19ba539fe3df7268075d6075787 (cherry picked from commit 65583e64172a0188d125117d1f2288e105832395)
* Don't use URLs as part of temporary file names (part 2)Dmitry Tantsur2022-05-302-32/+30
| | | | | | | | | | | | First, it's leaking information. Second, the URLs can be really long and cause "OSError: [Errno 36] File name too long". The same issue has already been fixed in the image cache, this change updates building ISO. Since the files are created in a temporary location, just use constant names. Change-Id: Ie5e0523bb4a8941bcb8dc87c4a0b29cb28ddfe40 (cherry picked from commit 2d885126ec5b3cfbe548fa42325d53fbc47d8fd4)
* Ironic Release 20.2Iury Gregory Melo Ferreira2022-05-051-0/+20
| | | | | | | This commit bumps the release_mappings to 20.2 to be used in the bugfix branch Change-Id: Iada7f443bc197112c6d8096c2eef16cae4693387
* Trivial: Remove prints in db api layer codeJulia Kreger2022-04-291-2/+0
| | | | | | | | I guess some prints slipped past cleanup and review for the node history work. Removes the two print statements as they are not needed. Change-Id: Ica506864ad443ad035a68ae8ffbe63cf68e5ccec
* Exclude current conductor from offline_conductorsHarald Jensås2022-04-283-2/+35
| | | | | | | | | | | | | | | | | | | In some cases the current conductor may have failed to updated the heartbeat timestamp due to failure of resource starvation. When this occurs the dbapi get_offline_conductors method will include the current conductor in its return value. In this scenario the conductor may end up forcefully remove node reservations or allocations from itself, triggering takeover which fail on-going operations. This change adds a wrapper to exclude the current conductor. The wrapper will log a warning to raise the issue. Related-Bug: #1970484 Stroy: 2010016 Task: 45204 Change-Id: I6a8f38934b475f792433be6f0882540b82ca26c1
* Merge "[iRMC] Change the way to get irmc-info in raid"Zuul2022-04-272-4/+5
|\
| * [iRMC] Change the way to get irmc-info in raidZhou Hao2022-04-242-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the node managed by the `irmc` hardware type, if the port number of the bmc address is manually specified, the following error will occur when configuring raid: ``` %d format: a number is required, not str ``` Change raid to call parse_driver_info to get irmc_info, so that irmc-port can be converted to int type to avoid this error. Story: #2010009 Task: #45151 Signed-off-by: Zhou Hao <zhouhao@fujitsu.com> Change-Id: I35e0aa2a5e612e6e45c9489153dbb3ff3e500a66
* | Fixes log formatiing string.Peter Rudenko2022-04-241-1/+1
|/ | | | | | | Closes-Bug: 1970091 Signed-off-by: Peter Rudenko <petro.rudenko@gmail.com> Change-Id: Ibfc494874dedf418cf0eb2df95492bd0e3cda46d
* Allow reusing defaults in per-node kernel_append_paramsDmitry Tantsur2022-04-117-28/+52
| | | | | | | | | | | | | | 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
* Start API after conductor is started in the combined executableDmitry Tantsur2022-03-241-3/+3
| | | | Change-Id: Icaffb5d346001d62e5c9522708dd44f01faeb3a6
* Prepare Yoga release with 20.1Iury Gregory Melo Ferreira2022-03-222-3/+23
| | | | | | | | | | | | | This is a pre-release commit for the Yoga release following our docs [1] * No API additions during this cycle (no need to update doc/source/contributor/webapi-version-history.rst) * Add prelude releasenote * Fix highlight in one releasenote [1] https://docs.openstack.org/ironic/latest/contributor/releasing.html Change-Id: If26019c5abc0643051f4b11186d7eb819f9c407b
* [trivial]Remove is_pxe_enabled function doc about ipxe_enabled optionJeffrey Zhang2022-03-201-2/+1
| | | | | | | ipxe_enabled option is already removed by 34d34b3a9d346c76d5cd9b126273f9b9e04c44e8 Change-Id: Ib96978aab60c60057dd9bc77e83ced0c95231917
* Merge "Use pycdlib to extract deploy iso"Zuul2022-03-182-67/+71
|\
| * Use pycdlib to extract deploy isoRiccardo Pittau2022-03-142-67/+71
| | | | | | | | | | | | | | | | | | | | Use pycdlib to extract the content of the deploy iso to get efiboot and grub config. Story: 2009704 Task: 44033 Change-Id: I62cdf2a09bc4233056799b64b7fdb87ad21b5bbd
* | Merge "Create API documentation from docstrings"Zuul2022-03-173-32/+54
|\ \ | |/ |/|
| * Create API documentation from docstringsMahnoor Asghar2022-03-173-32/+54
| | | | | | | | | | | | | | | | | | | | Create a new Sphinx extension called 'web_api_docstring' to process docstrings from the API classes, in order to generate API documentation. Story: 2009785 Task: 44291 Change-Id: Ia6b2b3741e2b1cbd29531c21795df4f0f0dc70ca
* | Merge "Fix rebuilds using anaconda deploy interface"Zuul2022-03-122-33/+55
|\ \
| * | Fix rebuilds using anaconda deploy interfaceRuby Loo2022-03-042-33/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The anaconda deploy interface was saving internal information in the node's instance_info, in the user-facing 'stage2' and 'ks_template' fields. This broke rebuilds using a different image with different stage2 or template specified in the image properties. This has been fixed by saving the information in the node's driver_internal_info instead. Addresses comments/nits from https://review.opendev.org/c/openstack/ironic/+/827924. Change-Id: Id9428518d21290fb38a0f7471a2cb69a6cb3ffb2
* | | Merge "Support img_type Glance property"Zuul2022-03-112-0/+18
|\ \ \
| * | | Support img_type Glance propertyDmitry Tantsur2022-01-282-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to change I4ce5f7a2317d952f976194d2022328f4afbb0258. Change-Id: I36673c801d426ea9cb204ca52b6fb6f719eb396a Depends-On: https://review.opendev.org/c/openstack/glance/+/826684
* | | | Merge "Anaconda deploy handles configdrive correctly"Zuul2022-03-115-10/+23
|\ \ \ \
| * | | | Anaconda deploy handles configdrive correctlyRuby Loo2022-03-035-10/+23
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The anaconda deploy interface wasn't handling configdrive correctly. This fixes: - the code was incorrectly treating the config drive as a dict, whereas it could also be in iso6600 format, gzipped and base64-encoded. It is handled properly now. - kickstart commands that deal with the config drive were added to the end of the kickstart file. Which means that they are executed after an ironic API request is sent to ironic to indicate that the node has been provisioned and is ready to be rebooted. Which means that there is a possible race condition wrt these commands being completed before the node is powered off. This has been fixed by putting the API request at the end of the kickstart file. Also, a sync was added to ensure that all modifications are written to disk. - extra newlines ('\n') were incorrectly added to the user data content. This broke the content-type decoding and cloud-init was unable to proces them. The extra newlines have been removed. Change-Id: If00342a1bfa3e87b2094061b0e2b0b69de3a8a4f
* | | | Merge "Shorten error messages in commonly used modules"Zuul2022-03-118-46/+39
|\ \ \ \
| * | | | Shorten error messages in commonly used modulesDmitry Tantsur2022-02-178-46/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Do not mention "deploy driver", it's not a thing. * Be careful with the pattern "Error: %s" or "Reason: %s". It is good for long introductory sentences, but looks poor for shorter ones and becomes really problematic when several instances are concatenated. This change updates deploy_utils, agent code and conductor modules. Change-Id: Ie1efea02b5f1a174e9ef8c5253ce9754a60b4c56
* | | | | Merge "Ignore fake nodes in the power sync loop"Zuul2022-03-092-2/+13
|\ \ \ \ \
| * | | | | Ignore fake nodes in the power sync loopDmitry Tantsur2021-12-092-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fake nodes have power_state None and the power interface returns None as well. Currently we make an update every loop, even though the values are the same. This change fixes it. Change-Id: I5227c058f3f6e1583b54a1cbc7edc6d42e20ae53
* | | | | | Suppress Bandit B509 in snmp.pyJulia Kreger2022-03-071-1/+4
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bandit's B509 (SNMPv3 no authentication/privacy) check is triggered by our line wrapping, as the check looks at the number of arguments, and triggers if it only parses 3 arguments. In Ironic's case, we pass five arguments. Presumably, this is due to the line wrapping. Ultimately this bandit check is very new having only been added with in the last few months. Change-Id: Idaee72a53a1f33bcab940c6ebe1e7c113a1cb1ce
* | | | | Merge "More fixes for anaconda deploy interface"Zuul2022-03-034-45/+60
|\ \ \ \ \
| * | | | | More fixes for anaconda deploy interfaceRuby Loo2022-02-284-45/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The anaconda deploy interface has a few issues that are addressed here: - fixes logic in get_instance_image_info() for anaconda. If the ironic node's instance_info doesn't have both 'stage2' and 'ks_template' specified, we weren't using any values from the instance_info. This has been fixed to use values from instance_info if specified. Otherwise, they are set as follows: The 'stage2' value is taken from the image properties. We use the value for 'ks_template' if it is specified in the image properties. If not (since it is optional), we use the config option's '[anaconda]default_ks_template' value. setting. - For anaconda's stage2 directory, we were incorrectly creating a directory using the full path of the stage2 file. It now correctly creates the right directory. - The anaconda deploy interface expects the node's instance_info to be populated with the 'image_url'; added code to do that in PXEAnacondaDeploy's prepare() method. - When the deploy is finished and the bm node is being rebooted, we incorrectly set the node's provision state to 'active' instead of doing it via the provisioning state machine mechanism. - The code that was doing the validation of the kickstart file was incorrect and resulted in errors; this has been addressed. - The '%traceback' section in the packaged 'ks.cfg.template' file is deprecated and fails validation, so it has been removed. Change-Id: I953e948bcfa108d4c8e7b145da2f52b652e52a10
* | | | | | Merge "Fix Redfish RAID for non-immediate controllers"Zuul2022-03-022-142/+418
|\ \ \ \ \ \
| * | | | | | Fix Redfish RAID for non-immediate controllersAija Jauntēva2022-02-172-142/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes ``redfish`` RAID interface workflow to not create more than 1 logical disks per controller at the same time when controller does not support 'Immediate' application time and system needs rebooting. With this fix virtual disks are grouped by controller and executed in batches when reboot is required. This enables ``redfish`` RAID interface to be used with iDRAC systems directly as although there are many controllers that support 'Immediate' application time, they do it only when system has completed loading. System intermittently completes loading after IPA starts executing clean or deploy steps rendering controllers not supporting 'Immediate' apply time and requiring reboot. This fix handles such scenario instead of failing to create more than 1 virtual disk. Story: 2009863 Task: 44529 Change-Id: Ia2ce34f09695731b0f48798f662006c4904e2223
* | | | | | | Merge "Fix prepare ramdisk for 'wait' states"Zuul2022-03-024-31/+25
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Fix prepare ramdisk for 'wait' statesAija Jauntēva2022-02-164-31/+25
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Merge "Add idrac-wsman clean steps to not require ramdisk"Zuul2022-03-024-8/+12
|\ \ \ \ \ \
| * | | | | | Add idrac-wsman clean steps to not require ramdiskAija Jauntēva2022-01-214-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For BIOS factory_reset updated to use power interface as direct REBOOT call fails when system is OFF that can happen if running without ramdisk. Change-Id: I9baf13e9a089bc692e8010dc7e291d7791d1f73c