This change makes ironic-lib consistent with ironic-python-agent
and diskimage-builder's defaults for ESP partition sizes.
The following fedora change lays out why this is a necessary
change: https://fedoraproject.org/wiki/Changes/BiggerESP
In summary, additional space is needed if OS driven firmware
flashing is going to take place, and unikernels + next generation
bootloaders are going to consume more space than the existing
grub loader has.
Change-Id: I4fc63c02bf57a08e75121cfa1fd35a56c0427553
Adds the capability for the topic to contain a port to which
the json rpc client will connect to. This allows for distinct
json-rpc targets to be configured in an environment.
Change-Id: I999316880639cd410543eb54475b0c647b35147b
Use direct I/O when overwriting the partition table to expose device
failures (which would not be directly noticed otherwise).
Change-Id: Ib0790099d895410681e4a1679bedea62209ff277
Internally, if we want to re-use ironic-prometheus-exporter
*and* get useful metrics data out through it for ironic itself,
we need we need someway to collect and return metrics data.
Turns out, we did most of this for statsd ages ago, and we can
just reuse the framework.
Change-Id: I6060da4ab80c2e6d19d78b808216ae262edcc84c
This change allows customizing the roles required for JSON RPC, to use
any roles different from the 'admin' role.
There is a plan, as part of SRBAC effort, to replace usage of the admin
role in each service by the new service role, which has more restricted
access, and we expect the ironic service user would require only
the service role once this work is done.
Change-Id: I143203be7827f73daba32e7c084c5807063ff91d
The blkid version included in util-linux 2.23.2 does not allow long
options name for probe and match-tag.
Use the short single letter name to restore compatibility with Centos 7
Story: 2009328
Task: 43764
Change-Id: I10a52c16ebe4e519d0af63b36c3a89fd5d371319
Extended boot records (EBRs) are used in the MSDOS partitioning
scheme to manage extended partitions. EBRs are small partitions
themselves and Ironic will therefore treat them like any other
partition during cleaning. Since EBRs are smaller than a GPT
(33 sectors), dd'ing 33 sectors will fail. This patch proposes
a fix to handle EBRs (and other tiny paritions) by adjusting
the number of blocks writtent to be the partition size at max.
Story: #2008539
Task: #41628
Change-Id: Ie9809b3e4fe2bea6b66ee95c442111942e85d618
qemu-img convert makes a number of allocation requests, and less
common than the "Resource temporarily unavailable" error is
"Cannot allocate memory". The first seems to be largely raised
upon a thread creation for the image conversion, where the first
appears to be on buffer setup on the original process.
Regardless, we should check for both and retry conversion
automatically.
rhbz# 1892773
Change-Id: If435ed0efe034d4bb99f0281ebc73840c0f38fb3
This middleware is added to ironic-lib so that it can eventually be
used by ironic and ironic-inspector as an alternative to noauth in
standalone environments.
This middleware is passed a path to a file which supports the
Apache htpasswd syntax[1]. This file is read for every request, so no
service restart is required when changes are made.
The only password digest supported is bcrypt, and the ``bcrypt``
python library is used for password checks since it supports ``$2y$``
prefixed bcrypt passwords as generated by the Apache htpasswd utility.
[1] https://httpd.apache.org/docs/current/misc/password_encryptions.html
Needed-By: https://review.opendev.org/727467
Needed-By: https://review.opendev.org/729463
Change-Id: I874783b8ece0eedf27a94dfed5163d0c82f8b9de
Story: 2007656
Task: 39740
socket.sendto() requires bytes and we need explicitly convert str to
bytes in py3.
Change-Id: Ib3f928963b11a2041caf1c3b15825125567ce360
Story: #2007537
Task: #39356
Long story short, we need to rescan after making
partition changes.
Without forcing a filesystem sync and rescan operation,
we rely upon lazy write-out from buffers to the block
device when operating with a ramdisk.
This is because ramfs does NOT actually operate with fsync
where as GNU parted utilizes fsync on the device in an
attempt to force the write to disk to occur. This is fine
if your booted with devfs, or say even a physical block
device that backs /dev, just not ramfs.
Change-Id: I66481d5f3c17a489f7bdf0af82e31b9107605968
Story: 2006423
Task: 36316
While `sgdisk -Z` is useful to wipe disk and partition
metadata, it will prevent execution and not do anything
if a CRC error is detected with the data already on disk.
We had previously run into this with IPA, however we never
addressed this with-in ironic-lib[0].
[0]: https://storyboard.openstack.org/#!/story/1737556
Story: 1737556
Task: 36305
Change-Id: I8fb390cb1daa481583ebcba6a010e9be3255b373
This matches the behaviour of the linux kernel, see:
d3511f53bb/block/partition-generic.c (L39)
Change-Id: Ic3963e5c4a1886aeabed6c5994599e72040a251e
Story: 2006154
Task: 35656
Currently list_partitions method fails if partition
name is defined on any GPT partition, it also only
extract one partition flag.
Updated _PARTED_PRINT_RE is now set to capture
partition name/description and partition flags.
Change-Id: I40410622829453a485aa33047848922ab134d725
Task: 30250
Story: 2005322
Ironic doesn't support local booting of images in BIOS boot mode
when the disk_label is GPT. The current changes creates BIOS Boot
partition when the disk_label is chosen as gpt. The partition size
is a configurable parameter.
Change-Id: Iade60da0316b8f1c0bf8ce4c79931c1105d19cec
Closes-bug: #1563291