summaryrefslogtreecommitdiff
path: root/ironic_python_agent
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Stop requiring mocking of utils.execute if ironic-lib execute is mockedDmitry Tantsur2021-10-272-17/+1
| |/ | | | | | | | | | | | | | | | | | | Based on unit tests, this was done intentionally, but I don't see reasons for that. It makes refactoring much harder, because sometimes you need to mock both execute functions and test them separately. In the end, utils.execute should be removed. Change-Id: I5a9c694ebe626c54f219d4870eab0a592777518d
* | Delete EFI boot entry duplicate labels firstJulia Kreger2021-11-012-24/+45
|/ | | | | | | | | | | | | | | | | | | | | | | Some firmware seems to take an objection with EFI nvram entries being deleted after one is added, resulting in the entire entry table being reset to the last known good state. This is problematic, as ultimately deployments can time out if we previously booted with Networking, and the machine, while commanded to do other wise, reboots back to networking regardless. We will now delete entries first, before proceeding. Additionally, for general use, this pattern may serve the community better by avoiding cases where we would have previously just relied upon efibootmgr[0] to warn us of duplicate entries. [0]: https://github.com/rhboot/efibootmgr/blob/103aa22ece98f09fe3ea2a0c83988f0ee2d0e5a8/src/efibootmgr.c#L228 Change-Id: Ib61a7100a059e79a8b0901fd8f46b9bc41d657dc Story: 2009649 Task: 43808
* Merge "Fix error messages in burnin code"Zuul2021-10-261-9/+5
|\
| * Fix error messages in burnin codeDmitry Tantsur2021-10-261-9/+5
| | | | | | | | Change-Id: Ib920b6f8da2c2c9d72dbb8bbd8915bde767bddd2
* | Respect global parameters when downloading a configdriveDmitry Tantsur2021-10-202-7/+78
|/ | | | | | | | * Use the same TLS parameters as everything else * Respect image_download_connection_timeout * Do not ignore HTTP errors Change-Id: I84f8021f731186d82e44ac3d4ef2d12df13f830a
* Assert EFI part UUID is not None before editing fstabArne Wiebalck2021-10-081-1/+1
| | | | | | | | | | The EFI partition UUID may be None and this will break the fstab editing. While this is not necessarily fatal when instantiating a node, it creates an exception at the end of bootloader installation, so only attempt to add a line to fstab when the UUID is not None. Change-Id: I68799980e67c05afe4ca68ca9733605dd166d54d
* Software RAID: Call udev_settle before creationArne Wiebalck2021-10-051-0/+7
| | | | | | | | | | | | This patch fixes a race during software RAID creation: we create the partition with parted, the kernel then notifies udev, but we need to wait for udevd to create the device files before calling mdadm to create the md device. Credits to jcosmao for finding this. Change-Id: I642f28acc351cf50263e37dfbc8468bf59de2cc5
* Merge "Trivial: minor fixes in error messages"8.2.0Zuul2021-09-093-3/+3
|\
| * Trivial: minor fixes in error messagesDmitry Tantsur2021-09-073-3/+3
| | | | | | | | Change-Id: I06b32c2eb576520cddff88074e4619070731017d
* | Merge "Trivial: better debugging in list_all_block_devices"Zuul2021-09-031-2/+5
|\ \
| * | Trivial: better debugging in list_all_block_devicesDmitry Tantsur2021-08-271-2/+5
| |/ | | | | | | | | | | | | One debug message only specified "Skipping" without any details. Another did not log the whole line from lsblk. Fix both. Change-Id: I9f8f4edad88ba2df5abc6a45a74ebdb3c7afcf97
* | Merge "Check the network burnin roles and partner"Zuul2021-09-022-0/+29
|\ \ | |/ |/|
| * Check the network burnin roles and partnerArne Wiebalck2021-08-102-0/+29
| | | | | | | | | | | | | | | | The network burnin roles are 'reader' and 'writer'. Raise an error if the role is not provided or if the role is unknown. Equally, raise an error if the partner is not provided. Change-Id: I6259a7b0d15d62e68b1dc27f0cb511f8563c02ce
* | Merge "Move loading of IPMI module loading to a single point"Zuul2021-08-233-66/+60
|\ \
| * | Move loading of IPMI module loading to a single pointJonas Schäfer2021-08-063-66/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | This means we do not have to rely on modprobe idempotency as much and it's less code duplication, which is always nice. Signed-off-by: Jonas Schäfer <jonas.schaefer@cloudandheat.com> Change-Id: I996aba47bc54309e15e7d56e4a96b23b8deb5c9c
* | | Merge "Output verbose info from efibootmgr"Zuul2021-08-112-21/+21
|\ \ \
| * | | Output verbose info from efibootmgrDerek Higgins2021-08-032-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging boot manager problems it can be advantageous to see all the full entries rather then just their labels. Change-Id: I6a1bb78acaf5a4284727bdf533d4be6db2099f50
* | | | Merge "Increase version of hacking and pycodestyle"Zuul2021-08-117-33/+41
|\ \ \ \ | |_|_|/ |/| | |
| * | | Increase version of hacking and pycodestyleRiccardo Pittau2021-07-307-33/+41
| |/ / | | | | | | | | | | | | | | | Fix H904 "Delay string interpolations at logging calls" errors Change-Id: I331808d0132094faf739998a6984440787d3ebf8
* | | Merge "Expose BMC MAC address in inventory data"Zuul2021-08-082-0/+125
|\ \ \ | |/ / |/| / | |/
| * Expose BMC MAC address in inventory dataJonas Schäfer2021-08-062-0/+125
| | | | | | | | | | | | | | | | | | | | This exposes the MAC address of the first LAN channel with an assigned IP address in the inventory data. This is useful for inventory processes where the asset number is not discoverable from the software side: the BMC MAC is going to be unique (at least within an organization). Change-Id: I8a4bee0c25743befd7f2033e4e0cba26895c8926
* | Merge "Force immediate NTP time sync with chronyd at IPA startup"8.1.0Zuul2021-07-203-46/+13
|\ \ | |/ |/|
| * Force immediate NTP time sync with chronyd at IPA startupArne Wiebalck2021-07-163-46/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make sure we have the correct time early, e.g. by the time we create a TLS certificate, this patch proposes to force an immediate NTP update when using chronyd. While the previous approach uses the passed NTP server as well, the update may happen only after chronyd has performed measurements (which may be too late). Story: #2009058 Task: #42843 Change-Id: I6edafe8edeb8549f324959e7a1ec175c3049a515
* | Merge "Catch ismount not being handled"Zuul2021-07-162-9/+153
|\ \ | |/ |/|
| * Catch ismount not being handledJulia Kreger2021-06-292-9/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating another grub issue, I was confused by the path taken in the logs reported, and noticed that on a ramdisk, we might not actually have a valid response to os.path.ismount, I'm guessing depending on what in memory filesystem is in use while also coupled with attempting to check a filesystem. Adds a test to validate that exceptions raised on these commands where this issue can be encountered, are properly bypassed, and also adds additional logging to make it easier to figure out what is going on in the entire bootloader setup sequence. Change-Id: Ibd3060bef2e56468ada6b1a5c1cc1632a42803c3
* | Burn-in: Add network stepArne Wiebalck2021-07-134-0/+170
|/ | | | | | | | | | Add a clean step for network burn-in via fio. Get basic run parameters from the node's driver_info. Story: #2007523 Task: #42385 Change-Id: I2861696740b2de9ec38f7e9fc2c5e448c009d0bf
* Merge "Only mount the ESP if not yet mounted"Zuul2021-06-252-7/+13
|\
| * Only mount the ESP if not yet mountedArne Wiebalck2021-06-212-7/+13
| | | | | | | | | | | | | | Check if the ESP is already mounted before attempting to mount it for the bootloader installation. Change-Id: Ifd738b2c5663f1a211d7e13b5ba386be631d8db1
* | Coalesce heartbeatsDmitry Tantsur2021-06-182-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IPA sends heartbeats to the conductor periodically and when requested, e.g. at the end of asynchronous commands. In order to avoid to send such notifications in too quick succession, e.g. when two asynchronous commands finish at the same time or when the periodic heartbeat was just sent right before a command ended, this patch proposes to coalesce heartbeats which are close together timewise and send only one for all of them in a time interval of 5 seconds. Co-Authored-By: Arne Wiebalck <arne.wiebalck@cern.ch> Story: #2008983 Task: 42633 Change-Id: Idfbce44065e1e5a8b730b94741b2604c51f0ab14
* | Reduce logging verbosity when collecting logsDmitry Tantsur2021-06-111-2/+1
|/ | | | | | | | It's not uncommon that some commands fail when collecting logs. We already log all failures in utils.execute, no need to duplicate them with a non-fatal ERROR logging. Change-Id: If151b3a3be979bd2b3ce01030e5d6242ad74eaa3
* Utilize CSV file for EFI loader selectionJulia Kreger2021-06-102-14/+115
| | | | | | | | | | | | | | | | | | | | | | Adds support to identify and utilize a CSV file to signal which bootloader to utilize, and set it when the OS is running as opposed to when EFI is running. This works around EFI loader potentially crashing some vendors hardware types when entry stored in the image does not match the EFI loader record which was utilzied to boot. Grub2+shim specifically specifically needs the CSV file name and entry label to match what the system was booted with in order to prevent the machine from potentially crashing. See https://storyboard.openstack.org/#!/story/2008962 and https://bugzilla.redhat.com/show_bug.cgi?id=1966129#c37 for more information. Change-Id: Ibf1ef4fe0764c0a6f1a39cb7eebc23ecc0ee177d Story: 2008962 Task: 42598 Co-Authored-By: Bob Fournier <bfournie@redhat.com>
* Merge "Burn-in: Add disk step"Zuul2021-06-074-0/+114
|\
| * Burn-in: Add disk stepArne Wiebalck2021-05-214-0/+114
| | | | | | | | | | | | | | | | | | | | Add a clean step for disk burn-in via fio. Get basic run parameters from the node's driver_info. Story: #2007523 Task: #42384 Change-Id: I5f5e336bd629846b3d779fd0fc7a2060b385b035
* | Merge "Ignore efi grub2-install failure"Zuul2021-06-072-29/+51
|\ \
| * | Ignore efi grub2-install failureSteve Baker2021-06-042-29/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent releases of redhat grub2 will always fail when installing to EFI paths, to encourage a transition to the signed shim bootloader. Partition image deploys avoid calling grub2-install with the preserve-efi-assets functions. Deploying whole disk images doesn't require grub2-install. This leaves whole disk images installed onto softraid devices, which still attempts to call grub2-install. This change will still attempt to run grub2-install in this one remaining case, but will ignore any failure. A future enhancement can avoid calling grub2-install entirely so that non-redhat secure-boot capable images can keep their signed bootloaders. Story: 2008923 Task: 42521 Change-Id: If432ef795d64d76442d739eb4f7d155ff847041e
* | | Merge "Refactor: use convert_image from ironic_lib"Zuul2021-06-042-27/+13
|\ \ \
| * | | Refactor: use convert_image from ironic_libDmitry Tantsur2021-06-012-27/+13
| |/ / | | | | | | | | | Change-Id: If890baf3545cff6cef7c645c42e7f9d9038c9aa7
* | | Merge "Stop accepting duplicated configdrive"Zuul2021-06-022-39/+71
|\ \ \ | |/ / |/| |
| * | Stop accepting duplicated configdriveDmitry Tantsur2021-06-022-39/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're currently requiring it twice: in image_info and in a separate configdrive argument. I think we should eventually settle on separate arguments for separate entities, so this change makes the value in image_info optional with a goal to stop accepting it. We could probably just remove the handling in image_info, but a deprecation is safer. The (unused in ironic) cache_image call is updated with an optional configdrive arguments. Story: #2008904 Task: #42480 Change-Id: I1e2efa28efa3ea7e389774cb7633d916757bc6ed
* | | Merge "Make _get_efi_bootloaders return relative paths"Zuul2021-05-272-17/+27
|\ \ \
| * | | Make _get_efi_bootloaders return relative pathsSteve Baker2021-05-262-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make this function useful for purposes other than efibootmgr entries, this change moves the path manipulation to _run_efibootmgr. This change also adds boot*.efi entries to BOOTLOADERS_EFI so that it includes every entry in the UEFI Spec 2.9[1] Table 3-2 UEFI Image Types. [1] https://uefi.org/sites/default/files/resources/UEFI_Spec_2_9_2021_03_18.pdf Story: 2008923 Task: 42521 Change-Id: Ibe02786609aa0de65115897d8f4a9b4f36c8aed2
* | | | Limit qemu-img execution arenasJulia Kreger2021-05-262-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu-img attempts to launch multiple threads by default *and* attempts to have multiple memory allocation arenas to operate from. While multithreading can be good for performance, this pattern and the memory footprint for process launch and dependencies can turn the memory footprint for a cirros image conversion (16MB) into 1.2GB of memory being asked for by the qemu-img tool. In order to limit this impact, as the default number of arenas is governed by the number of CPUs times the number 8, it seems reasonable to lower this to a more reasonable number which also helps keep our possible memory footprint from being exceeded. Change-Id: I71a28ec59ec31c691205eb34d9fcab63a2ccb682 Story: 2008928 Task: 42528
* | | | Merge "Rewrite write_image.sh in Python"Zuul2021-05-263-78/+42
|\ \ \ \ | |/ / / |/| | |
| * | | Rewrite write_image.sh in PythonDmitry Tantsur2021-05-183-78/+42
| | | | | | | | | | | | | | | | Change-Id: I0caa65561948f4e0934943a7a0d3a209701b5a59
* | | | Merge "Enable out-of-order writes when writing whole disk images"Zuul2021-05-251-1/+1
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | Enable out-of-order writes when writing whole disk imagesDmitry Tantsur2021-05-181-1/+1
| | | | | | | | | | | | | | | | | | Per documentation it improves performance when using -O host_device. Change-Id: Ic6a97af9f865d07c9cb4257397a320475a28f88b
* | | Merge "Do not serialize command_params"Zuul2021-05-182-7/+1
|\ \ \ | |/ / |/| |
| * | Do not serialize command_paramsDmitry Tantsur2021-05-182-7/+1
| |/ | | | | | | | | | | | | | | | | The command params can be huge when configdrive is used. There is no point in sending them back, Ironic does not use them anyhow. Story: #2008904 Task: #42479 Change-Id: I6e3db5db2042ca3fb5dafacfacf036fd7fc2fc4c
* | Merge "Remove the iscsi extension"Zuul2021-05-126-697/+9
|\ \
| * | Remove the iscsi extensionDmitry Tantsur2021-05-106-697/+9
| |/ | | | | | | Change-Id: I2f0e581575112d6c7ba0d211661cab3e0b6caca6