With the addition of devices with type 'MD' during
list_all_block_devices (for "empty" devices), partitions on top
of md devices are now returned as well. These don't need deletion,
so skip these during software RAID cleanup.
Story: #2006355
Task: #36121
Change-Id: Idff9b9b0cbe42b57aa315ae07c0b51c35c9ade1e
Fixes:
- Softraid creation: size_gb unit conversion to default parted unit.
- Softraid creation issue when we specify several logical disks with
more than one having its size specified (not 'MAX').
- Softraid creation issue when a logical disk with size_gb 'MAX' is
not last in the list.
Change-Id: I13e087611354a35acc2925037f1b10047477d972
Story: 2006352
Task: 36118
While most modern Linux distributions do not create RAM disks, newer
TinyCoreLinux actually does. Ignore them since we don't want to deploy
to RAM.
Change-Id: Ia810c7fb47f7098b8173d765ff9c33b48a223ff1
These devices are mapped into memory, but nonetheless can appear
in lsblk output. Ignore them explicitly.
Change-Id: I2bb595ef29abdc98bd887bdf41c3c7f64cc3a7e6
The output for aarch64[1] `lshw -quiet -json` is a bit different from
x86_64, this will lead to 0 physical memory calculated currently. This
patch aims to make it compatible for aarch64 when getting physical memory
[1]: http://paste.openstack.org/show/754789/
Change-Id: Ib7b4ee857d8550e3d75ac8a53c61f0ecab45feff
When listing block devices, empty devices are not listed by
default. In order to clean up broken software RAID devices,
however, we need to list these as well. This patch adds the
corresponding option to 'lsblk', makes sure the device type
filtering handles the additional device type ('md' instead
of 'raid*' when an md device has only spares), and takes
care of lsblk reporting size '' for empty devices.
Story: #2006215
Task: #35807
Change-Id: I523e2ed90f3a477b5f5f27054b65fcfd26239ba2
This patch amends the component and holder disk detection code
to be able to also extract information from inactive/broken md
devices. This may be required in case of broken RAID-0 (which
will show up as an empty inactive device after a reboot which
none the less keeps its spare devices 'in-use' and prevents
RAID re-creation).
Story: #2006215
Task: #35808
Change-Id: I4ce41b335843e18c67668192d2fccff1c6cdfb92
The from_device_file method in pyudev.Device is deprecated since
version 0.18
Using the same method from pyudev.Devices is now recommended.
Increasing minimum version of pyudev to 0.18 and correctly handling
exception raised by from_device_file.
Change-Id: I0637585241c81a36f69aef8017f1134f5c526eb1
The lshw output is huge even on virtual machines, and it pollutes
the debug logging. This change silences it. Instead, the lshw output
is collected as part of the ramdisk logs.
Depends-On: https://review.opendev.org/#/c/665635/
Change-Id: I6a3015b2d8d09f6f48b5cbd39dc84bd75b72f909
During automatic cleaning, the generic hardware manager erases the
data and the metadata on all block devices. If this is done on RAID
members, the RAID device is destroyed. This patch proposes to exclude
RAID members from (meta)data cleaning.
Change-Id: I9ec7674925d981062c311cf34eadfe4cb891f077
Story: #2004581
Task: #33640
This will retrieve the hostname of the host being introspected, and
return it as part of the introspection data.
Change-Id: I54084251e1b0f3a40fe5ac760b2a7e45199c9fdb
Story: #2005867
Task: #33674
Remove the preformatting of log messages to avoid any formatting
is done when the corresponding log level not enabled.
Additional nits addressed:
- make the supported RAID levels a top-level frozenset
- remove unused return value from validate_configuration
Follow-up to Id20302537f7994982c7584af546a7e7520e9612b
Change-Id: If6484847a16f938c80523f0b7ec6ae52ea9cf598
Pass an array to utils.execute() or enforce string usage
via 'shell=True', but don't mix.
Follow-up to Id20302537f7994982c7584af546a7e7520e9612b
Change-Id: I2e6c628360aecf81039089af78b19fe6a956e564
This patch proposes to extend the IPA to be able to deploy on
software RAID devices. The IPA needs to be able to detect an
md device, find the underlying holder disks and configure grub
on them.
Change-Id: Ieb2c95ff130b5cc1e643fcde500066d9458ddbec
Story: #2004581
Task: #29102
This patch proposes to extend the IPA to be able to configure software
RAID devices. For this, the {create,delete}_configuration methods of
the GenericHardwareManager are implemented.
Change-Id: Id20302537f7994982c7584af546a7e7520e9612b
Story: #2004581
Task: #29101
This is a missing fix for patch.[1]
[1] https://review.opendev.org/#/c/656275/
Change-Id: I8443ae0c08487afea383e111b6c2b6d5941d4024
Task: 30654
Story: 2005528
Modify the metadata erasing call chain to retrieve a list of devices
that includes partitions in addition to disks so it can erase metadata
from all of them, otherwise incidentally recreating disk partitions
causes the Linux kernel to discover and automatically recreate some
types of storage entities (eg LVM PVs, VGs, & LVs, RAID members &
devices).
Change-Id: If8f47a083966051856439e3291a6872929b93e3b
Story: #2003673
Task: #26192
Currently we erase the disks one by one, which takes a long
time to finish, this patch adds support to the IPA so that
it can erase disks in parallel if told so.
Story: 1546949
Task: 11548
Co-Authored-By: yuan liang <leetpy2@gmail.com>
Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: If5cfb6ec000a654d07103c4b378d4c135249e238
On CoreOS images, IPA runs in a Debian Jessie chroot which uses mawk as
its default awk implementation. However, mawk doesn't support POSIX
character classes such as [:space:], which means get_bmc_address() fails
to parse the BMC IP address from the output of ipmitool.
This patch replaces the use of [[:space:]] by [ \t] which is equivalent
for the purpose of parsing the output of ipmitool. Note that matching on
tab characters is not strictly required as the packaged version of
ipmitool only uses space characters, but is left in case tabs are used
in other versions.
Change-Id: I0e3306a4d4584ca28e03608e9f7270b770960a39
Story: #2004121
Task: #27571
ATARAID is functionally a version of software
RAID where the setup is managed by the controller
and the Operating System takes over managing the
RAID after boot. Most commonly this is found for
mirrored boot devices.
Prior to this patch, we were looking for non-dependent
items (i.e. base block devices), with a type of disk.
Now we will permit the "disk" to be added to the list
if lsblk indicates that it is a type containing "raid".
The lsblk results should not change as we explicitly
look for disk objects.
Change-Id: Ia4a03b33cc06ce42e1bc33026683c28b31901cb7
Story: #2003445
Task: #24647
This patch adds support to retrieve IPv6 address.
A new field ``ipv6_address`` is added to NetworkInterface
and store the assigned IPv6 address (if any).
Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: Ia527a5aa48e3daf66d2be190e43935b38b3bd6f9
Closes-Bug: #1744064
Story: #1744064
Task: #11604