The change in frameworks with the API changed the overall execution
behavior from single threaded serialized execution threaded to
multithreaded through eventlet.
But we signaled ourselves to wait for the API to stop, but never
actually stopped the API.
As setting the flag to stop the API is a hard notification that
the API must now exit, there is no reason to wait and block exit,
hence the simple nature of this change.
Now the threads should exit, IPA should exit, and rescue should
ideally work.
Change-Id: I3faf2d169d4edac6a2321f8649bb9ce478885ea1
Story: 2006998
Task: 37768
This patch adds a function that will be responsible to identify
the efi partition on a give device, this is necessary on the Software
Raid scenario and when installing bootloader.
Change-Id: I5f326db2d37b2a15090ec84e477e63f7d92e7447
Co-Authored-By: Raphael Glon <raphael.glon@corp.ovh.com>
WSME is no longer maintained and Pecan is an overkill for our (purely
internal) API. This change rewrites the API in Werkzeug (the library
underneath Flask). I don't use Flask here since it's also an overkill
for API with 4 meaningful endpoints.
Change-Id: Ifed45f70869adf00e795202a53a2a53c9c57ef30
Rather than assuming that the root fs is in the first partition
of the deployed image, use the UUID passed from the conductor.
Change-Id: Ie2299372e94386902e0a8be0597250ec52e1fec9
Story: #2006649
Task: #36887
Depends-on: https://review.opendev.org/686580
netaddr is quite a big library, and all we need is covered by
the built-in ipaddress module (available in python 3).
Also add a safeguard for invalid 'ip route' output.
Change-Id: I9d76a8d1c1b6b1585e301a9c63b37fab3b98746f
Since we've dropped support for Python 2.7, it's time to look at
the bright future that Python 3.x will bring and stop forcing
compatibility with older versions.
This patch removes the six library from requirements, not
looking back.
Change-Id: I4795417aa649be75ba7162a8cf30eacbb88c7b5e
Looks like adding RAID 5/6 support may be easier than most
could immagine. The code, as written appears to be safe and
logical creating a RAID 5 or RAID 6 volume.
Not that we can really test this in CI, but it seems only
validation code needs to be changed to loosen the constraint.
Change-Id: Ib891b3c97f0bfb02af3b59581a451c4b25e03b85
Configuration options like api-url had been deprecated long time ago[1],
this patch removes it.
[1] https://review.opendev.org/#/c/131632/
Change-Id: Ie448b35a4423066ef44dca7616e716cb5c118881
To accommodate network setup that takes longer then
30 seconds increase the number of IP lookup attempts. This
allows for IPv6 setup that occurs after DHCP has time out.
Change-Id: I1351e150a63c6247210ca0cbc8ce0abfe82129cd
Fixes regression in commit 9f8fa2853af00045118ccd44180e7053e6d027af:
utils.execute returns unicode by default, but this data is binary.
Change-Id: I5b54c1f6cfac5fff672245c523b9fb647478edbd
Lets not do silly things and if the disk looks bootable,
and we're not trying to do UEFI, then let us assume the
proper thing will occur upon power-up.
Looks at the boot sector data and if an executable is
found in the first 218 bytes, then it bypasses loading
a boot loader.
Also adds a dependency on the "file" linux distribution
package.
Change-Id: I11bc26670a08ee13174a43d7cd0f1ab9c1bd35cf
Story: 2006474
Task: 36410
In some cases, where the rts library is not installed, IPA
was recently changed to try and tear down the local side of
the iscsi connection by trying to tear down bond and target
being offered. The whole attempt with this is to ensure that
no disk locks are in place which can prevent partition table
updates.
Since we added this logic, in some cases these commands can
fail and cause the deployment process to fail when it would
have otherwise succeeded. As such, suppress the errors.
Change-Id: I0e04936ad337b394dd68e9b0396a9f1203218f9f
When deploying an image to a software raid array, it is currently
required that the deployed image assembles the md arrays automatically
so that the rootfs can be mounted. In order to remove this
requirement/limitation on the deployed image we can add rd.md.uuid to
the kernel command line with the raid array's uuid.
Story: 2006648
Task: 36884
Change-Id: I42cb198753ecd84b7eaef6b5aa7c2064535bfe0e
Falls back to attempt to use findfs to locate
a UUID or PARTUUID match as opposed to trying to
list and enumerate through lsblk output.
Can confirm that tinycore 8.x's findfs binary works
expected.
Story: 2006724
Task: 37141
Change-Id: I4d488e4a1ab680eb1353b158c3339cb30b056ada
This reverts commit 258d963e406c512bb90295c700ee22e4609abcd0.
Remove the mbr/gpt choice from softraid features for now, as it cannot be
directly used without additional commits, to be pushed soon. Furthermore, it
could even lead to instance spawn misconfiguration, if the disk label
specified in instance_info cannot fit with the boot mode + partitioning layout
(example: you build softraid over gpt, then you lose the mbr gap. Thus you need
an additional bios boot partition, in BIOS boot mode, or an esp, in UEFI boot
mode, outside the raid, for grub to install itself inthere, to be able to
assemble raid and find root device correctly).
Change-Id: I3a0a704ea99a40eb3fc8e879270dfbd356951488
With raid, we were able to observe a condition where
the file is still open for non-exlcusive access which
blocks the software raid from being shutdown... which
is realistically needed to force a rescan in that case.
Change-Id: I8dbfae091267f8af5340ff5ebeebcba375d05542
Cleaning presently fails on floopy disk controllers.
While they may be uncommon in server hardware, they
can exist in virtual machines, and even as virtual
devices on some hardware chassises.
Change-Id: I8ba07bfd5ca1e503f46c1bac4fffb5f509186939
Story: 2006419
Task: 36309
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