Commit Graph

3187 Commits

Author SHA1 Message Date
Zuul 42fa5d6386 Merge "Force constraints when installing a package during tox test" 2024-02-18 12:44:58 +00:00
Zuul ac32c33b68 Merge "Remove compatibility with Python < 3.8" 2024-02-14 20:31:24 +00:00
Luke Odom ae53e8e4b3 Swap partprobe and udev settle
On ubuntu based systems calling these in opposite causes a
race condition where partitions aren't ready when we read/use them

Closes-Bug: 2050013
Change-Id: Ied7e4f17786dfc0e7f54962013e48ff96c5faa88
2024-02-12 11:18:01 -08:00
Riccardo Pittau 31ecf49b97 Force constraints when installing a package during tox test
The tox deps option grants installation of single dependencies and
requirements, optionally pinned using constraints, before installing
a package, therefore not granting installation of the correct
constraint during the package installation.
To fix that tox 4.4.0 has introduced the constrain_package_deps
option [1]

[1] https://tox.wiki/en/4.12.1/faq.html#using-constraint-files

Change-Id: I14a93e67735df0f1b82dd687873ec77d8bfaac78
2024-02-12 14:58:41 +01:00
Zuul 118da00f2f Merge "Split common qemu-img functions from disk_utils" 2024-02-07 22:18:36 +00:00
Zuul 64d82cd1d6 Merge "Bump hacking to 6.1.0" 2024-01-29 08:09:00 +00:00
Takashi Kajinami e76360a991 Bump hacking to 6.1.0
... which is the latest version available now.

Change-Id: I777ae1dd4202ae43da35089a36fc760894acae6e
2024-01-27 23:07:37 +09:00
Dmitry Tantsur 7644196e7d
Split common qemu-img functions from disk_utils
Adds a new module for two qemu-img wrappers that are used both by Ironic
and IPA. The remaining functions in disk_utils are only used by IPA and,
since most of them require root, can no longer be used in the
post-rootwrap Ironic any more. They should be moved to IPA eventually.

Change-Id: I3364a58b52a3e57c2f52356a6496865b749e74a8
2024-01-23 14:00:43 +01:00
Sharpz7 4ac6cf0857 [codespell] - Adding CI for codespell tox target
Adding CI for https://review.opendev.org/c/openstack/ironic-lib/+/905569/1

Related Bug: https://bugs.launchpad.net/ironic-python-agent/+bug/2047654

Change-Id: I8e2c7b88fcea44d5ede851b40657b0acc3cf9e54
2024-01-17 17:01:52 +00:00
likui 399220b36a Remove compatibility with Python < 3.8
... because this library now supports only Python 3.8 or newer
versions.

Change-Id: Ice1bec17f23ab1fa7abdafa324e0b83942b4101a
2024-01-17 10:36:31 +08:00
Dmitry Tantsur 87a739fe17
Raise on non-existing file in qemu_img_info
I'm not sure why we silence the exception, right now it causes us a very
hard to debug failure. No code in Ironic seems to rely on this behavior.

Change-Id: I3740b600c60ed1b39808d18af2b5074e7e07a149
2024-01-15 17:24:27 +01:00
Sharpz7 5e1ca2a437 [codespell] Add tox target and configuration for codespell
Continuing the work of @JayF in other repos.

Adds a tox target for codespell, `tox -e codespell`. Can optionally
be run as `tox -e codespell -- -w` to get automatic spelling fixes
applied where appropriate. Adds small amounts of configuration to
setup.cfg, including an ignore list of words.

Related Bug: https://bugs.launchpad.net/ironic-python-agent/+bug/2047654

Change-Id: I284045ee9dfb51eee59a0442abda657c74abed05
2024-01-15 07:16:35 +00:00
Sharpz7 7952b5d788 [codespell] Fixing spelling issues in Ironic-Lib
Continuing work by @JayF in other ironic repos. Find that explanation below.

This fixes several spelling issues identified by codepsell.

Later changes in this chain will provide the codespell config used to
generate this, as well as adding this commit's SHA, once landed, to a
.git-blame-ignore-revs file to ensure it will not pollute git historys
for modern clients.

Related Bug: https://bugs.launchpad.net/ironic-python-agent/+bug/2047654

Change-Id: I38ad9c46add87b0e67c912f2920f76ea7d0c3b80
2024-01-15 07:16:16 +00:00
Zuul 536db45764 Merge "Drop lower-constraints.txt (again)" 2024-01-09 02:45:24 +00:00
Takashi Kajinami d938b6d8e0 Drop lower-constraints.txt (again)
The commit 9d116cd7c6 says it removes
the file but it didn't.

Change-Id: I1a519b205cce0fc7eeefba8f162d4542c4412425
2024-01-08 23:43:53 +09:00
Zuul 523407eebf Merge "Compatibility with zeroconf 0.129.0" 2024-01-05 19:54:03 +00:00
Jay Faulkner 078cdabdf5 Improve error message for wrong metrics backend
We should breadcrumb the operator into what this message means -- right
now, it looks like a programming error when in most cases this is a
configuration error.

Related-bug: 2047709
Change-Id: Ica627834f799cffbf283ee01a2b2482a607c316d
2023-12-29 11:20:28 -08:00
Thomas Goirand e2ced90dc5
Compatibility with zeroconf 0.129.0
From Zeroconf CHANGELOG.md:
v0.129.0 (2023-12-13)

Feature

* Add decoded_properties method to ServiceInfo
https://github.com/python-zeroconf/python-zeroconf/issues/1332
9b595a1dca
* Ensure ServiceInfo.properties always returns bytes
https://github.com/python-zeroconf/python-zeroconf/issues/1333
d29553ab7d

Technically breaking change

* `ServiceInfo.properties` always returns a dictionary with type
`dict[bytes, bytes | None]` instead of a mix `str` and `bytes`. It was
only possible to get a mixed dictionary if it was manually passed in
when `ServiceInfo` was constructed.

Co-Authored-By: Dmitry Tantsur <dtantsur@protonmail.com>
Change-Id: I7f1a0c3329e5f29ec3e274558e3681142cc2ef78
2023-12-19 11:50:19 +01:00
Zuul 54597e9210 Merge "Trivial: remove an incorrect comment" 2023-12-06 19:27:49 +00:00
Zuul a0e26d4f8e Merge "JSON RPC: add support for unix sockets and extract common code" 2023-12-06 18:18:44 +00:00
Dmitry Tantsur 13fcbb9258
Trivial: remove an incorrect comment
IP addresses work, we even have unit tests for them.

Change-Id: I2765047896d722e647e69f0a03e3bb3b48c41b3b
2023-12-06 17:25:47 +01:00
Dmitry Tantsur 9846a1c18f
JSON RPC: add support for unix sockets and extract common code
Listening on Unix sockets is helpful when the whole Ironic is behind
a reverse proxy, as it's the case in Bifrost and Metal3 with TLS on.

This change also extracts some common code to be reused in Ironic later.

Change-Id: I3488b9bb67470ce6d062187dc5e44852f6908493
2023-11-24 18:56:06 +01:00
Julia Kreger 2f7f72e147 Increase the ESP partition size to 550 MB
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
2023-11-07 07:12:24 -08:00
Zuul bdbd0e9287 Merge "Add jsonrpc client port capability" 2023-05-08 19:19:58 +00:00
Jay Faulkner 853bedce5c Upgrade to latest hacking - v6
Includes a single minor change to comply with latest flake8.

Change-Id: Ifda4810940f5c4d963946939f103f65175cc7868
2023-04-21 12:26:23 -07:00
Julia Kreger 0a62259018 Add jsonrpc client port capability
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
2023-04-04 10:01:38 -07:00
Riccardo Pittau 7a00c0d674 Exclude all files starting with . from flake8 tests
Some tests tool and IDE may create a .local directory inside the repo
with virtualenvs for dependencies, other tools may create . directories
or files for temporary reports.
While they can be removed in a second time, or configured differently,
it's advisable to just exclude all file starting with . from the
flake8 tests to avoid confusion and possible unexpected errors.

Change-Id: Iea00e194fbe9c89754fb0a65cdaaabdaad31e4cc
2023-03-23 14:39:56 +01:00
Arne Wiebalck ec6ba65392 Use direct writes when erasing the GPT
Use direct I/O when overwriting the partition table to expose device
failures (which would not be directly noticed otherwise).

Change-Id: Ib0790099d895410681e4a1679bedea62209ff277
2023-03-01 15:11:04 +01:00
Zuul 71a7655723 Merge "Provide an interface to store metrics" 2023-02-06 18:29:47 +00:00
Julia Kreger 71e06086b0 Provide an interface to store metrics
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
2023-01-06 08:48:35 -08:00
Riccardo Pittau 55b67de89e Fix tox4 error
Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.

Change-Id: I20029ec4944b68a98c1b94b2b76dd81dcd2c5209
2022-12-28 14:59:04 +01:00
Jay Faulkner 1c6af2e63a No longer override install_command in tox.ini
Per ClarkB on the list, overriding install_command makes it more
difficult to troubleshoot behavior differences and failures.

Change-Id: I3fb6760bf4754bd1688db173037e55c238a0601e
2022-11-29 07:37:27 -08:00
OpenStack Release Bot c0ae15fb9c Add Python3 antelope unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: If9bde0075d92c09491085d1c6dc05e36d0810fe1
2022-09-08 07:52:18 +00:00
Zuul 340a4b264a Merge "remove unicode prefix from code" 2022-08-24 15:15:02 +00:00
Zuul ded2a504e2 Merge "Drop lower-constraints.txt and its testing" 2022-08-24 15:15:00 +00:00
leiyashuai 9d116cd7c6 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I0f09e027650d5c2953dab7191b3f3286a37057f1
2022-08-23 08:30:19 -03:00
niuke d7d956a7c1 remove unicode prefix from code
Change-Id: I107d7e7c6c86775707670d8fdfbfd0e7c0e17bff
2022-08-23 18:27:07 +08:00
Zuul 2b8bd311cc Merge "Replace the netboot job with a local-boot one" 2022-08-09 03:45:16 +00:00
Dmitry Tantsur 2337a06533 json_rpc.client: log the URL and exceptions
Change-Id: I0c02d68fd82dc5c9d5fec32ca98f02e98228eca2
2022-07-13 12:37:27 +02:00
Dmitry Tantsur b9f7ec7c3d Replace the netboot job with a local-boot one
Change-Id: I14b4134f6ba3f3d04d89a19caec3dc253a1d537f
2022-07-07 16:30:46 +02:00
Zuul d7a2345a62 Merge "CI: Removing job queue" 2022-07-05 13:52:53 +00:00
Harald Jensås 0aa35a0edb Remove python version 2 pkgs from bindep
Follow up to change: Iee5ac3a778f8106b7f2e96cd9294e2da28fe4def

Since Python version 2 is not supported we can remove these.

Change-Id: I79a4b189a7fb220a97d83601002339ebfae45104
2022-06-27 11:04:45 +00:00
Iury Gregory Melo Ferreira 179772a05a CI: Removing job queue
Please see:
https://zuul-ci.org/docs/zuul/latest/releasenotes.html#relnotes-4-1-0-deprecation-notes

Change-Id: I97687d815503f2e444f4ecc3ce98ea60aaaa8b20
2022-05-19 16:04:52 -03:00
LiZekun 5662b92fda Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I7b79d0bc10c4c5c48e167e7042d383921feb1486
2022-05-19 07:24:08 +00:00
Zuul d67fa037cd Merge "Add Python3 zed unit tests" 2022-05-04 19:28:52 +00:00
Riccardo Pittau 95ce746ad1 Update jobs names
Also actually set netboot to bios

Change-Id: I572d723e6b0d685a8a1ce9ec21c86adce3f25db4
2022-04-14 10:46:32 +00:00
OpenStack Release Bot 97b93d249f Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: Id611d09e96e43a19c145db61fa717151b4a20bdd
2022-03-07 14:07:26 +00:00
Zuul e205816df7 Merge "Add platform:base-py[2|3] to bindep" 2022-02-21 13:41:39 +00:00
Iury Gregory Melo Ferreira 7d68f9484c Follow-up Allow customizing roles to use JSON RPC
This is a follow-up for I143203be7827f73daba32e7c084c5807063ff91d
with minor fixes requested in the review.

Change-Id: I83a506b0a489efe56b4a11a954a76fe0783fa4ba
2022-02-17 09:56:48 -03:00
Harald Jensås 3818348e5b Add platform:base-py[2|3] to bindep
Ansible playbook from bindep fails to install package
python-devel on python3 environment.
https://opendev.org/opendev/bindep/src/branch/master/playbooks/bindep/run.yaml#L31

Add platform:base-py[2|3] to python devel rpm packages.

Related: RHBZ#2054559
Change-Id: Iee5ac3a778f8106b7f2e96cd9294e2da28fe4def
2022-02-15 22:36:34 +01:00