summaryrefslogtreecommitdiff
path: root/ironic_python_agent
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge "Migrate functional tests for work_on_disk from ironic-lib"Zuul2021-05-121-0/+82
|\ \
| * | Migrate functional tests for work_on_disk from ironic-libDmitry Tantsur2021-05-101-0/+82
| |/ | | | | | | | | | | Missed in commit 24951b1029170840484a50fdd38d2a57858a578c. Change-Id: Iad5e8f161ac69b96b9332d83fe22b5e0b9192258
* | Merge "Burn-in: Add memory step"Zuul2021-05-114-0/+89
|\ \
| * | Burn-in: Add memory stepArne Wiebalck2021-05-014-0/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a clean step for memory burn-in via stress-ng. Get basic run parameters from the node's driver_info. Story: #2007523 Task: #42383 Change-Id: I33a83968c9f87cf795ec7ec922bce98b52c5181c
* | | Merge "Software RAID: RAID the ESPs"Zuul2021-05-112-126/+117
|\ \ \
| * | | Software RAID: RAID the ESPsArne Wiebalck2021-04-162-126/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For software RAID in UEFI mode, we create ESPs on all holder disks and copy the bootloader there. Since there is no mechanism to keep the ESPs in sync, e.g. on kernel upgrades or when kernel parameters are updated, the ESPs will get out of sync eventually. This may lead to a situation where a node boots with outdated parameters or does not have any of the installed kernels in the boot menu anymore. This change proposes to RAID the ESPs. While the UEFI firmware will find an ESP partition (one leg of the mirror), the node will see an md device and all subsequent updates will go to all member disks. Also, remove the source ESP after copying in order to avoid mount confusion (same UUID!). Story: #2008745 Task: #42103 Change-Id: I9078ef37f1e94382c645ae98ce724ac9ed87c287
* | | | Merge "Fix NVMe Partition image on UEFI"Zuul2021-05-102-1/+45
|\ \ \ \
| * | | | Fix NVMe Partition image on UEFIJulia Kreger2021-05-042-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The _manage_uefi code has a check where it attempts to just identify the precise partition number of the device, in order for configuration to be parsed and passed. However, the same code did not handle the existence of a `p1` partition instead of just a partition #1. This is because the device naming format is different with NVMe and Software RAID. Likely, this wasn't an issue with software raid due to how complex the code interaction is, but the docs also indicate to use only whole disk images in that case. This patch was pulled down my one RH's professional services folks who has confirmed it does indeed fix the issue at hand. This is noted as a public comment on the Red Hat bugzilla. https://bugzilla.redhat.com/show_bug.cgi?id=1954096 Story: 2008881 Task: 42426 Related: rhbz#1954096 Change-Id: Ie3bd49add9a57fabbcdcbae4b73309066b620d02
* | | | | Merge "Burn-in: Add CPU step"Zuul2021-05-104-1/+128
|\ \ \ \ \ | | |_|/ / | |/| | / | |_|_|/ |/| | |
| * | | Burn-in: Add CPU stepArne Wiebalck2021-05-014-1/+128
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a clean step for CPU burn-in via stress-ng. Get basic run parameters from the node's driver_info. Story: #2007523 Task: #42382 Change-Id: I14fd4164991fb94263757244f716b6bfe8edf875
* | | Merge "Remove runtime dependency on pbr"Zuul2021-05-043-7/+12
|\ \ \
| * | | Remove runtime dependency on pbrDmitry Tantsur2021-04-263-7/+12
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Pbr is a very heavy package to depend on. It requires git-core, which is 16 MiB on my Fedora. We only use it to detect the version, which can be done without pbr using a much lighter importlib_metadata. Copied from https://review.opendev.org/c/openstack/osprofiler/+/739379 Change-Id: I5f434e6bfde6f645804941f3a36d5458a28270e7
* | | Import deployment logic from ironic-libDmitry Tantsur2021-05-034-33/+1546
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two functions work_on_disk and create_config_drive_partition contain a substantial part of the deployment logic. Previously we placed them in ironic-lib for re-using on the conductor side in the iSCSI deploy interface. Since the iSCSI deploy is going away, we can move this code to ironic-python-agent to simplify maintenance. Imports code from ironic_lib commit 9fb5be348202f4854a455cd08f400ae12b99e1f2. Change-Id: I6cbcd81533f135208b57746cb0e33ffdfaf94eee
* | | Merge "Fix getting memory size in some lshw output"Zuul2021-04-303-7/+201
|\ \ \
| * | | Fix getting memory size in some lshw outputZane Bitter2021-04-293-7/+201
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to a regression in lshw introduced by https://github.com/lyonel/lshw/pull/60, there are some versions in the wild that do not return sizes for memory banks <32GiB. In those cases, work around the problem by looking at the top-level size (if available) to find the total size. Previously we assumed that we only needed the top-level size when there was no list of memory banks. The issue is fixed upstream by https://github.com/lyonel/lshw/pull/65, but the erroneous patch is still present in the lshw-B.02.19.2-5.el8 package in CentOS 8.4 and 8.5. Change-Id: I6eb5981d28b9ae368239af0c1d0ec32ff79d95b3 Story: #2008865 Task: 42395
* | | Fix missing data in log messagesZane Bitter2021-04-291-2/+2
|/ / | | | | | | Change-Id: I5d08deed86d79a7ea0b7a1625122af595037dab5
* | Merge "Do not fail network interface collection on unsupported interface"Zuul2021-04-222-6/+14
|\ \
| * | Do not fail network interface collection on unsupported interfaceDmitry Tantsur2021-04-072-6/+14
| | | | | | | | | | | | | | | | | | | | | Currently if one interface cannot be handled (e.g. it has empty MAC), the whole collection fails. Ignore unsupported interfaces instead. Change-Id: Ibdaad62b39c239d4f3fb3111c2fae9e31e877b28
* | | Add a call to "udevadm settle" in write_image.shDerek Higgins2021-04-201-0/+1
| |/ |/| | | | | | | | | | | | | | | | | After GPT and MBR are destroyed systemd-udevd gets triggered which may hold /dev/sda open preventing qemu-img from writting its image. Story: 2008830 Task: 42312 Change-Id: I6105192a16fcb7f6898910e8d0ab824d731d491d
* | Merge "Always fall back to sysrq when power off fails"Zuul2021-04-142-10/+20
|\ \
| * | Always fall back to sysrq when power off failsDmitry Tantsur2021-04-132-10/+20
| |/ | | | | | | | | | | | | The line we're looking for is not there when IPA is in a container, at least for CentOS based containers. Just fall back to sysrq on errors. Change-Id: Ie4ee605ad9c6cda58808512a563247175859c71e
* | Merge "Capture the early logging"Zuul2021-04-083-2/+36
|\ \ | |/ |/|
| * Capture the early loggingJulia Kreger2021-04-013-2/+36
| | | | | | | | | | | | | | | | | | | | | | _early_log prints to stdout, which is fine in some cases, however in other cases it gets lost in the shuffle of process launch by things like systemd. Lets try to save everything, and re-log it so it is easy to debug early issues. Change-Id: I334a9073d17cccec4c669fae82edc3e388debc5c
* | Fix incorrect lsblk tag and add a virtual media jobDmitry Tantsur2021-03-302-16/+18
|/ | | | | | | | | | | Follow-up to 8dd6589e66d03e45e1d510601da9531a30842cff: PATH is not a valid lsblk tag, we need to use KNAME with -p flag. Also add a vmedia job to avoid breakages in the future. It's added non-voting because we have a deadlock with this change: https://review.opendev.org/c/openstack/ironic/+/783722 Change-Id: Ifffeac9c1c4d394526d655eaa14c9fe7bd3a1e5e
* Merge "Validate vmedia for vmedia usage"Zuul2021-03-292-61/+307
|\
| * Validate vmedia for vmedia usageJulia Kreger2021-03-292-61/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Virtual media devices based logic needs to be guarded from being used or considered based upon if the machine actually booted from virtual media, or not. At the same time, actual devices need to be checked in order to make sure they align with what we expect in order to prevent consideration of content which should not be leveraged. Change-Id: If2d5c6f4815c9e42798a2d96d59015e1b1dbd457 Story: 2008749 Task: 42108
* | Do not permit IPA standalone to be enabled by confJay Faulkner2021-03-252-7/+1
|/ | | | | | | | | | IPA standalone mode is a developer-only option, and if enabled accidentally on a production agent could cause undesired behavior. Developers who need this behavior should build a purpose-built agent, with standalone hardcoded to True in cmd/agent.py. Change-Id: Icc67dbe15acbbf6fee886f274d2169a0769a5053
* typo chanages -> changesBernd Mueller2021-03-241-1/+1
| | | | Change-Id: Ifb75a5f6f01bd98011464eb05f98d8db001dcd54
* Refactor: use mounted from ironic-libDmitry Tantsur2021-03-232-186/+53
| | | | Change-Id: I0b597ddbc71c133abe6c0acfd8f49e3af4e896bb
* Fix root UUID for streamed partition imagesSteve Baker2021-03-192-1/+15
| | | | | | | | | | | | | | The root UUID changes after a streamed partition image is written to the block device, causing later deployment failure when assuming the old UUID. This change updates the root UUID after streaming the partition image is complete. This issue may have been missed in local testing because deploying the same image repeatedly will result in stable root UUID across runs. Change-Id: Ice4630c16fc216980488d1427f3b02e1b8a417fa
* Check the base device if the read-only file cannot be readBob Fournier2021-03-092-2/+32
| | | | | | | | | | | For some drives, the partition e.g. `/dev/sda1` will not have the 'ro' file which can result in a metadata erasure failure but the base device (`/dev/sda`) will have this file. Add an additional check for the base device. Change-Id: Ia01bdbf82cee6ce15fabdc42f9c23036df55b4c5 Story: 2008696 Task: 42004
* Merge "Remove default parameter from execute"Zuul2021-03-034-31/+18
|\
| * Remove default parameter from executeRiccardo Pittau2021-03-024-31/+18
| | | | | | | | | | | | | | | | | | The param check_exit_code from the processutils extension execute has default already at [0] See: https://opendev.org/openstack/oslo.concurrency/src/branch/master/oslo_concurrency/processutils.py#L214 Change-Id: Iedff5325e0737556d5eb3da601c984ddfc633873
* | Merge "Increase the memory limit for qemu-img"Zuul2021-03-021-2/+2
|\ \ | |/ |/|
| * Increase the memory limit for qemu-imgDerek Higgins2021-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We appear to be bumping up against this limit when deploying RHCOS images(currently 977MB). Curiously the problem isn't happening all the time but increasing the limit eliminates it. This limit was intruduced to guard against a malicious image allocating an arbitrary amount of memory. Nothing else runs on hosts when IPA is running so we should be ok bumping up the limit. Story: #2008667 Task: #41955 Change-Id: I9405995915a874b00b7177c9642c5469d05d66a8
* | Remove nvme-cli warning and delay on nvme-formatJacob Anders2021-03-022-3/+3
|/ | | | | | | | | | This change adds '-f' flag to nvme-cli calls during NVMe Secure Erase. This removes nvme-cli output warning that the device is about to be irreversibly deleted as well as the related 10 second delay which is pointlessly increasing NVMe cleaning time. Story: 2008290 Change-Id: I7b7b8b7d4f643b07d5c9dcf7ec35cf7ebedf44d1
* Merge "Use try_execute from ironic-lib"Zuul2021-03-013-62/+47
|\
| * Use try_execute from ironic-libRiccardo Pittau2021-02-253-62/+47
| | | | | | | | | | | | Also adapt unit tests Change-Id: I37d050877daabc9dc0a5821cf20a689652b26f34
* | Allow clean_configuration to run against full-device arraysMohammed Naser2021-02-273-0/+50
|/ | | | | | | | | | | | At the moment, it is not possible for Ironic to clean up a RAID array that is built from an entire device. This patch allows it to do so by overriding the behaviour of attempting to find the device name if the device names does not end with a number and is a real block device. Story: #2008663 Task: #41948 Change-Id: I66b0990acaec45b1635795563987b99f9fa04ac7
* Merge "New deploy step for injecting arbitrary files"Zuul2021-02-226-0/+773
|\
| * New deploy step for injecting arbitrary filesDmitry Tantsur2021-02-166-0/+773
| | | | | | | | | | | | | | | | | | This change adds a deploy step inject_files that adds a flexible way to inject files into the instance. Change-Id: I0e70a2cbc13744195c9493a48662e465ec010dbe Story: #2008611 Task: #41794
* | Merge "Add support for using NVMe specific cleaning"Zuul2021-02-193-8/+638
|\ \
| * | Add support for using NVMe specific cleaningJacob Anders2021-02-183-8/+638
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds support for utilising NVMe specific cleaning tools on supported devices. This will remove the neccessity of using shred to securely delete the contents of a NVMe drive and enable using nvme-cli tools instead, improving cleaning performance and reducing wear on the device. Story: 2008290 Task: 41168 Change-Id: I2f63db9b739e53699bd5f164b79640927bf757d7
* | | Merge "Move some raid specific functions to raid_utils"Zuul2021-02-184-103/+213
|\ \ \
| * | | Move some raid specific functions to raid_utilsRiccardo Pittau2021-02-174-103/+213
| |/ / | | | | | | | | | | | | | | | | | | To reduce size of the hardware module and separate the raid specific code in raid_utils, we move some functions and adapt the tests. Change-Id: I73f6cf118575b627e66727d88d5567377c1999a0
* | | Fixes local boot for partition imageskartikeyaj02021-02-171-1/+1
|/ / | | | | | | | | | | | | | | | | | | IPA is not properly checking if the root partition is already mounted. Device is being passed to os.path.ismount() instead of the mount point. Story: 2008631 Task: 41839 Change-Id: I37a6e7e6bbe0bbbb0317c6e55bb822dafe7cce20
* | Remove samples from the hardware test moduleRiccardo Pittau2021-02-122-887/+905
|/ | | | | | | They take a lot of space and tehy're mainly static data. Move them to a separate module that can also be shared with other tests. Change-Id: I9c76c014430d524da7fa331c922976d283b870c3
* Fix error message with UEFI-incompatible imagesDmitry Tantsur2021-02-102-21/+39
| | | | | | | | It's somewhat confusing at the moment, since we're trying to find a UEFI partition by UUID "None". Don't search for partition if we don't know its UUID, and provide a better error message. Change-Id: Ief874084132797a445ddae8009264712a05facfd
* Merge "Use variable for lsblk columns device info"Zuul2021-02-082-34/+42
|\
| * Use variable for lsblk columns device infoRiccardo Pittau2021-02-032-34/+42
| | | | | | | | | | | | | | | | Adjusted unit tests accordingly. Also removed redundant parenthesis. Change-Id: I8e2cac5172f009d5204f83bd83e1f27cfd721f09