be3882162e432b292af9e787661661a05fa7d11a
Commit Graph

936 Commits

Author SHA1 Message Date
Dmitry Tantsur
be3882162e Remove the iscsi extension
Change-Id: I2f0e581575112d6c7ba0d211661cab3e0b6caca6
2021年05月10日 12:43:44 +02:00
Zuul
4ac3d79519 Merge "Remove runtime dependency on pbr" 2021年05月04日 19:11:39 +00:00
Dmitry Tantsur
24951b1029 Import deployment logic from ironic-lib
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
2021年05月03日 14:17:57 +02:00
Zuul
10c29cdc41 Merge "Fix getting memory size in some lshw output" 2021年04月30日 12:24:44 +00:00
Zane Bitter
ed791d9778 Fix getting memory size in some lshw output
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
2021年04月29日 14:41:11 -04:00
Zane Bitter
c56cd4abc0 Fix missing data in log messages
Change-Id: I5d08deed86d79a7ea0b7a1625122af595037dab5
2021年04月29日 09:55:56 -04:00
Dmitry Tantsur
3251d7b641 Remove runtime dependency on pbr
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
2021年04月26日 09:16:34 +02:00
Zuul
9edb13d891 Merge "Do not fail network interface collection on unsupported interface" 2021年04月22日 16:35:25 +00:00
Derek Higgins
9c3fbfd000 Add a call to "udevadm settle" in write_image.sh
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
2021年04月20日 17:48:46 +01:00
Zuul
c72997d8d0 Merge "Always fall back to sysrq when power off fails" 2021年04月14日 12:13:37 +00:00
Dmitry Tantsur
b395181b1b Always fall back to sysrq when power off fails
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
2021年04月13日 19:05:04 +02:00
Zuul
5bac375f73 Merge "Capture the early logging" 2021年04月08日 12:22:32 +00:00
Dmitry Tantsur
1ab405b509 Do not fail network interface collection on unsupported interface
Currently if one interface cannot be handled (e.g. it has empty MAC),
the whole collection fails. Ignore unsupported interfaces instead.
Change-Id: Ibdaad62b39c239d4f3fb3111c2fae9e31e877b28
2021年04月07日 17:16:27 +02:00
Julia Kreger
df418984f0 Capture the early logging
_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
2021年04月01日 11:16:20 -07:00
Dmitry Tantsur
afcc5d392c Fix incorrect lsblk tag and add a virtual media job
Follow-up to 8dd6589e66: 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
2021年03月30日 12:25:14 +02:00
Zuul
49d123dd6e Merge "Validate vmedia for vmedia usage" 2021年03月29日 23:38:10 +00:00
Julia Kreger
8dd6589e66 Validate vmedia for vmedia usage
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
2021年03月29日 13:22:43 -07:00
Jay Faulkner
de726d4acf Do not permit IPA standalone to be enabled by conf
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
2021年03月25日 12:45:28 +01:00
Bernd Mueller
2a64413bb6 typo chanages -> changes
Change-Id: Ifb75a5f6f01bd98011464eb05f98d8db001dcd54
2021年03月24日 13:53:32 +01:00
Dmitry Tantsur
d622d38da6 Refactor: use mounted from ironic-lib
Change-Id: I0b597ddbc71c133abe6c0acfd8f49e3af4e896bb
2021年03月23日 17:24:03 +01:00
Steve Baker
e61336602f Fix root UUID for streamed partition images
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
2021年03月19日 12:08:43 +01:00
Bob Fournier
4afe4f6069 Check the base device if the read-only file cannot be read
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
2021年03月09日 07:05:27 -05:00
Zuul
7931ccedfb Merge "Remove default parameter from execute" 2021年03月03日 07:14:44 +00:00
Zuul
77bc398833 Merge "Increase the memory limit for qemu-img" 2021年03月02日 16:03:45 +00:00
Riccardo Pittau
bff252c726 Remove default parameter from execute
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
2021年03月02日 16:19:32 +01:00
Derek Higgins
5492ad7da5 Increase the memory limit for qemu-img
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
2021年03月02日 11:38:57 +00:00
Jacob Anders
d2127e7ef4 Remove nvme-cli warning and delay on nvme-format
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
2021年03月02日 15:37:35 +10:00
Zuul
4a22c887f8 Merge "Use try_execute from ironic-lib" 2021年03月01日 13:54:15 +00:00
Mohammed Naser
ab267aabdd Allow clean_configuration to run against full-device arrays
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
2021年02月27日 17:24:16 -05:00
Riccardo Pittau
0459c61c8d Use try_execute from ironic-lib
Also adapt unit tests
Change-Id: I37d050877daabc9dc0a5821cf20a689652b26f34
2021年02月25日 14:46:17 +01:00
Zuul
6ea3aff8d6 Merge "New deploy step for injecting arbitrary files" 2021年02月22日 18:48:22 +00:00
Zuul
2979ee5314 Merge "Add support for using NVMe specific cleaning" 2021年02月19日 12:13:55 +00:00
Jacob Anders
8bcf1be920 Add support for using NVMe specific cleaning
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
2021年02月18日 22:51:34 +10:00
Zuul
a9aa1add36 Merge "Move some raid specific functions to raid_utils" 2021年02月18日 06:52:34 +00:00
Riccardo Pittau
7d7940d904 Move some raid specific functions to raid_utils
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
2021年02月17日 10:11:13 +01:00
kartikeyaj0
319efe2c2d Fixes local boot for partition images
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
2021年02月17日 10:56:31 +05:30
Dmitry Tantsur
59cb08fd28 New deploy step for injecting arbitrary files
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 
2021年02月16日 16:56:52 +01:00
Riccardo Pittau
a35761c21f Remove samples from the hardware test module
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
2021年02月12日 14:48:37 +01:00
Dmitry Tantsur
403d2f06c6 Fix error message with UEFI-incompatible images
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
2021年02月10日 18:08:58 +01:00
Zuul
68d9c70fba Merge "Use variable for lsblk columns device info" 2021年02月08日 02:25:10 +00:00
Riccardo Pittau
fc1f2c73c6 Use variable for lsblk columns device info
Adjusted unit tests accordingly.
Also removed redundant parenthesis.
Change-Id: I8e2cac5172f009d5204f83bd83e1f27cfd721f09
2021年02月03日 15:31:32 +01:00
Iury Gregory Melo Ferreira
d2495a092c Mock tests to return bios boot mode
When running IPA unit tests on machines configured
with UEFI and GPT partition table, some tests will
fail.
Change-Id: I155a47242b526b8f243a5e94bc14da8431f1ab91
2021年02月03日 14:44:41 +01:00
Xinliang Liu
68a43b9da8 Fix UEFI boot entry creation for aarch64
Diskimage-builder installs grub with option '--removable'[1], thus for
aarch64 no 'grubaa64.efi' file in efi directory only got 'BOOTAA64.EFI':
linaro@bm-ubuntu:~$ tree /boot/efi
/boot/efi
└── EFI
 └── BOOT
 └── BOOTAA64.EFI
2 directories, 1 file
[1]: 8f12d9530e/diskimage_builder/elements/bootloader/finalise.d/50-bootloader (L158)
Task: #41698
Story: #2008560
Change-Id: I9fc55c068ea980beae273411db9d3568eec25eb8
2021年01月27日 03:32:23 +00:00
Kaifeng Wang
6072e2d65a Remove lldp-timeout support
The kernel parameter lldp-timeout was deprecated removed in this patch.
Change-Id: I98da49e61d9ed3236cc495d1ab351eba0931473b
2021年01月15日 16:13:52 +08:00
Zuul
8d5862d8b2 Merge "Handle situation when a configdrive is already mounted" 2020年12月21日 14:09:04 +00:00
Julia Kreger
4fb8163717 Fix boot mode detection for partition images
Previously, partition images were hard coded to be bios based
as opposed to consulting all of the values AND the node itself
before making the most appropriate determination. Now the agent
utilises the internal helper to properly determine the boot
mode when calling ironic-lib.
Story: 2008070
Task: 41265
Change-Id: Id5eeda69d5b9de2b393af414472d57b0d4380c43
2020年12月19日 19:03:16 +00:00
Julia Kreger
246e0cf29e Change default ironic_lib invocation to flag local booting
The partition image support has been telling ironic-lib
that the machine will be local booted. While this is likely
harmless, and doesn't seem to break anythign, we should have
it match moving forward just to be on the safe side so we don't
accidently break things down the road.
Change-Id: I33e5d583964ef8c21aa04d7427bcd3957b89d449
2020年12月19日 19:02:58 +00:00
Zuul
433bcffdf2 Merge "Add fstab pointer to EFI partition" 2020年12月17日 22:42:58 +00:00
Zuul
49de16edd2 Merge "Prevent broken partition image UEFI deploys" 2020年12月17日 22:41:31 +00:00
Zuul
e40984c084 Merge "Fix default disk label with partition images" 2020年12月17日 22:41:25 +00:00