503 Commits

Author SHA1 Message Date
Zuul
56fe73e0ed Merge "Testing bad microversions on v1/nodes/{uuid}/firmware" 2025-02-14 23:38:36 +00:00
Zuul
92a2f21108 Merge "Testing bad microversions on v1/allocations" 2025-02-14 23:11:00 +00:00
Jay Faulkner
abd2e74389 Inspector tests need not provision afterwards
Currently our introspection scenario test tries to do a lot in serial; a
full node inspection followed by provisioning the node. We should just
ensure the node gets back to AVAILABLE and consider that good enough.

Change-Id: I8c82bec61ad6a8465a3142b904bc444bca89a967
2025-02-11 15:41:21 -08:00
Zuul
be28153212 Merge "Improve check_vm_connectivity" 2025-02-11 23:33:40 +00:00
Vasyl Saienko
514d3947d3 Improve check_vm_connectivity
It may take some time for cloud init to setup ssh keys,
so its possible server start responding over ping, but SSH
is still not awailable. This patch adds a check that we can
pass SSH authentication before doing final vm connectivity
check.

Change-Id: I415aff416a07a7b69baf8b152a37c3602d9702bc
2025-02-10 17:25:04 +00:00
Zuul
79c1e4d92e Merge "enable pre-commit lints from main ironic repo" 2025-02-10 02:15:25 +00:00
Zuul
ebce2f4be4 Merge "fix spelling mistakes found by codespell" 2025-02-09 20:27:39 +00:00
Zuul
56e1630527 Merge "add pyproject.toml to support pip 23.1" 2025-02-08 09:26:23 +00:00
Doug Goldstein
5564ceea09
enable pre-commit lints from main ironic repo
Brought over the same lints as used in the main ironic repo via
pre-commit and ruff. Updated tox.ini to use pre-commit the same way.

Change-Id: Ic2138427fd408a581cfbcb9c9da84074d1a2bfa8
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-02-02 11:31:19 -05:00
Doug Goldstein
a736e8263f
fix spelling mistakes found by codespell
Change-Id: I92b0102037cd13fed07e385d7fd1e55d03bfe51b
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-02-02 11:31:16 -05:00
Doug Goldstein
4a405c51cb
add pyproject.toml to support pip 23.1
pip 23.1 removed the "setup.py install" fallback for projects
that do not have pyproject.toml and now uses a pyproject.toml
which is vendored in pip.
To address that, this change adds the minimal pyproject.toml
to enable pbr to be properly used to build editable wheels.

See https://pip.pypa.io/en/stable/news/#v23-1
and https://github.com/pypa/pip/issues/8368 for more
details on the removal of the fallback support.

setuptools v64.0.0 is used to support editable installs
via its PEP-660 implmentation
https://github.com/pypa/setuptools/pull/3488

This patch was taken nearly verbatim from the equivalent nova change.

Change-Id: Ic65834742445d9930200836a5c9f5bf774e30693
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-02-02 11:31:12 -05:00
Sharpz7
2a0fe067fa Testing bad microversions on v1/nodes/{uuid}/firmware
Adding tests to check if microversions are handled correctly.

Change-Id: I4dfcef77c3632201d76e45f988ff9c4801cdc4e7
2025-01-31 06:30:27 +00:00
Sharpz7
2728cdd9f7 Testing bad microversions on v1/allocations
Adding tests to check if microversions are handled correctly. Will be adding Topic "bad-microversion-testing" going forward to track what is completed.

Change-Id: I6052afb3ea2563b3651b0b4dfcd6f1c8817a6f7b
2025-01-31 02:22:46 +00:00
Julia Kreger
26bf3b5014 Remove reboot from basic baremetal ops
While investigating the 4k job, I noticed the test sometimes has trouble
SSHing back in to the host post-reboot due to no fault of the test.

In other tests, it looks like we manage to get SSH'ed in just as the
deployed host is online.

This is because cloud-init or other configuration changes have been
applied in the OS, which is outside the act of "deploying" the node.

In other words, we were spinning our basic job for several hundred
seconds in some cases on just waiting for the OS to reboot, and then
trying to verify the OS behaves the same as before we rebooted.

Ultimately, to conserve resources *and* reduce failure risk by trying
to test OS behavior, removing the reboot call and post-reboot re-ssh/ping
check behavior.

Change-Id: Ie08335e0e10f51f782a27270c62e33aa84a8c568
2025-01-27 06:36:34 -08:00
Sharpz7
e8b6e91d2c Microversion Test Generator
Adds a generator to make testing microversion enforcement significantly easier.

Generated-By: ChatGPT-4o
Change-Id: I1b88c2cb934bce4bb7ead88bc9ceceb90263e293
2024-12-19 00:32:15 +00:00
Zuul
b6c0572a8a Merge "Fix failure cases around test_ports" 2024-11-19 20:36:10 +00:00
Zuul
dd8fb70f9d Merge "Testing microversions on v1/shards" 2024-11-18 22:55:14 +00:00
Sharpz7
e91d4f5ddf Testing microversions on v1/shards
Adding tests to check if microversions are handled correctly, specifically on shards for now. Based on https://gist.github.com/Sharpz7/97356eb57f77d3ee75892791c6cab155 which I use locally.

Generated-By: Perplexity w/ GPT-4o
Change-Id: I126ca11095cd049a34a98f9185e7237d3969f9a4
2024-11-14 19:39:16 +00:00
Julia Kreger
658f79ddce Fix failure cases around test_ports
In some cases where operators seek to use ironic-tempest-plugin,
there may not be complete networking configuration behind ironic,
like site specific cleaning and provisioning networks, which is
fine, that is a choice the operator has made, but then if the
default network interface, which these tests were modeled upon
is a different network interface, such as flat or neutron,
then these tests will fail.

So instead of rely upon the state configuration of ironic
in terms of what network interface to end up with, we now assert
the noop network interface to explicitly tell ironic "we know what
we want/expect" for the test to operate.

This sort of class of failure has come up a few times with slight
variations, where functionally the test suite just was developed
expecting everything under the backend driver hood to be noop.

Closes-Bug: 2087263
Change-Id: Iea732f58c23dd0c79305a86b6707fb750aabf30f
2024-11-13 17:11:12 -08:00
Dmitry Tantsur
2c87dd4ef3
Use the correct exception when checking for HTTP 406
Tempest has introduced NotAcceptable exception [1], breaking our usage of
UnexpectedResponseCode. Use the new exception.

[1] e60b317062

Change-Id: I1e07e09348613493572d6aa55a2a3cde686497ed
2024-11-12 11:38:02 +01:00
Ghanshyam Mann
dc5ba3f634 Remove stable/2023.1 job from master gate
stable/2023.1 is planned to be in unmaintained state[1]
and with python 3.8 drop from Tempest[2], we have to pin the
Tempest for stable/2023.1 testing[3]. This means Tempest and
its plugin master does not need to support stable/2023.1.

With that we can remove the stable/2023.1 jobs from tempest
plugin master jobs.

[1] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/UDQAC7SR5JAQJE5WBAG54A2MTBVBTJ44/
[2] https://review.opendev.org/c/openstack/tempest/+/933398
[3] https://review.opendev.org/c/openstack/devstack/+/933704

Change-Id: I5882ea574438fc8f9bd4384524701a69a7d13c56
2024-11-06 11:51:39 -08:00
Takashi Kajinami
84f214229a Remove support for Python 3.8 and older
Python 3.6 and 3.7 are not supported any of active stable branches now,
so no longer need to be supported.

Also remove Python 3.8 support according to [1].

[1]
https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/FOWV4UQZTH4DPDA67QDEROAESYU5Z3LE/

Also add a few new versions currently tested.

Change-Id: I2773938f4e7c4db213e9435fbf7ceaa6e0887f43
2024-10-26 22:02:04 +00:00
Zuul
1d1656f8d6 Merge "Drop unnecessary 'x' bit from doc config file" 2023.1-last 2.12.0 2024-10-22 07:51:34 +00:00
Zuul
c250ae7f8d Merge "Add stable/2024.2 job" 2024-10-21 14:21:07 +00:00
Takashi Kajinami
d3b566d1ed Drop unnecessary 'x' bit from doc config file
This file is not actually executable.

Trivial-Fix

Change-Id: I0a1baef864342a2ca91d552cf2de6a881d25c9f7
2024-10-21 11:20:56 +00:00
Takashi Kajinami
61e18d1483 Add stable/2024.2 job
stable/2024.2 was released, so should be tested now.

Also make all stable/2023.2 jobs non-voting to keep two voting
stable branches.

Change-Id: I2ec84d288d77c26eb5381976365dcbc6445ca1da
2024-10-07 21:07:21 +09:00
Julia Kreger
1dad2c3b3c Fallback to SSH if ping fails
While trying to work out a test case and using the tempest
plugin to exercise a centos VM, I noticed it didn't ping,
when I had previously done other work to the VM. It has
SSH'ed, it might have failed, but try to SSH in case ping
fails.

Change-Id: I4e125529de4ff96c42194f91b18281a642a30018
2024-10-04 14:13:37 +00:00
Dmitry Tantsur
f915c62e98
Check inspection data and abortion in the standalone tests
Depends-On: https://review.opendev.org/c/openstack/ironic/+/930279
Change-Id: Iff8d1243d350a9e91910b2a3ebd1db92637d4a0f
2024-09-24 10:40:31 +02:00
Dmitry Tantsur
dd0f879695
Provide consistent spelling of the microversion header
Headers must not be case-sensitive, but since we use a simple dict for
collecting them, it's possible to end up with two conflicting headers
for the API version. Make sure to use the same spelling.

Change-Id: I9c9554e4d317c7d06f9c78162967218fbf118b50
2024-09-20 15:27:34 +02:00
Zuul
fd8163d231 Merge "The adoption test should not depend on the iscsi deploy" 2.11.0 2024-09-20 10:28:25 +00:00
Zuul
dcb8df84f7 Merge "Work around missing microversion headers on /" 2024-09-19 14:43:49 +00:00
Dmitry Tantsur
f51e00f4aa
The adoption test should not depend on the iscsi deploy
It was removed many releases ago, the test is now always skipped.

Change-Id: I0f03575ed99afbfe49c8207403d4d0ae5d1d50da
2024-09-19 13:36:28 +02:00
Zuul
c9fc1882bc Merge "CI: scale back the number of inspector and scope enforced jobs" 2024-09-18 20:15:08 +00:00
cid
cf168b8d29 Add tempest tests for runbooks
Change-Id: Ic1694a28542f83a08a3c1f77f4397ad285a628c0
2024-09-18 00:27:25 +01:00
Julia Kreger
540ab0c813
CI: scale back the number of inspector and scope enforced jobs
* Remove specific scope enforced jobs from master

With recent oslo.policy changes, we no longer need to have specific
scope enforced test jobs. As such, removing them from master branch
testing.

* Leave only the master ironic-inspector job voting

Inspector is deprecated and does not receive many changes. Leave one
voting jobs and 2 non-voting: for 2024.1 and the discovery one.

* Remove inspector scope enforced jobs from the gate

They are not in the check pipeline and must not be in the gate.
Same logic as above applies to these jobs.

* Copy anaconda jobs into the gate pipeline

Voting check jobs must be in the gate, so fixing the descrepancy.

* Purge definitions of unused jobs.

Co-Authored-By: Dmitry Tantsur <dtantsur@protonmail.com>
Change-Id: I17e1604b036e98ee2e8ce6424bfeb2b0bef8e471
2024-09-09 15:50:13 +02:00
Dmitry Tantsur
7faed25a84
Work around missing microversion headers on /
In get_min_max_api_microversions, we issue a request against the root
endpoint / to get the available microversions. This endpoint does return
them in the body but due to an issue in Ironic does not return the
microversion headers. Unfortunately, our implementation of request()
makes Tempest expected these headers and fail if they're absent.

Until Ironic is fixed, use /v1 to get the required information.

Change-Id: I7003e0c90ce764c903d870d739786a8a97d5f0af
Related-Bug: #2079023
2024-09-05 10:00:57 +02:00
Dmitry Tantsur
b294d966d1
A simple standalone test for in-band inspection
Redfish is chosen because it is virtually guaranteed to support managed
inspection, unlike IPMI which may require a separate PXE setup.

Adds support for setting enabled interfaces, which is already relied
upon by the iDRAC tests but is not actually implemented.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/927265
Change-Id: Ib66ac41c2919bade7c0c1ca3d8bb4fdfd2acf858
2024-08-27 14:48:16 +02:00
Zuul
6d1e5510bf Merge "Handle invalid configuration for vif test execution" 2024-05-30 17:34:30 +00:00
Zuul
078c4f4542 Merge "Exclude ramdisk tests with tinycore in uefi mode" 2024-05-30 16:27:36 +00:00
Zuul
21492f0001 Merge "reboot the node in basic ops tests" 2024-05-30 16:27:34 +00:00
Julia Kreger
feb584a39f reboot the node in basic ops tests
Apparently this was not exercised previously, and it is now exercised
as confirmed via the nova-compute service logs.

Change-Id: I2c14cc91a719ef94d88662701e9b5fdca3ad50a2
2024-05-23 22:28:23 +00:00
Zuul
7969b40380 Merge "Additional test state fixes" 2024-05-23 07:05:46 +00:00
Zuul
1e3a5a5a55 Merge "Patch to enforce json extension works in existing API behaviour" 2024-05-23 06:56:36 +00:00
Julia Kreger
a41979ee83 Exclude ramdisk tests with tinycore in uefi mode
Tinycore artifacts are not uefi bootable unless the firmware
jumps back to bios booting the node. This presents with ramdisk
tests when a node may end up using the tinycore linux iso image if
a boot iso cannot be reliably built in Ironic's CI due to CI resource
provider constraints.

Instead, we now will just skip the test if we detect this case.

Closes-Bug: 2065811
Change-Id: Iae0ba6a52aa81f02202da768d4f755469badfe33
2024-05-20 08:51:13 -07:00
Zuul
316fed10a2 Merge "Vmedia advanced ops: Clarify config drive and don't ping after rebuild" 2024-05-15 18:17:24 +00:00
Julia Kreger
332dacdaba Handle invalid configuration for vif test execution
It is entirely possible to run the tempest tests without a physical
network parameter for the compute service. Turns out the network is
required when you use [network]shared_physical_network set to true,
because without it we can't figure out how to attach to the network.

So now we skip when the input configuration is such that there is
no way for the tests to proceed.

Closes-Bug: 2065378
Change-Id: Ic448a1a6383c2da2567b9da2262d4572536296ed
2024-05-14 10:15:26 -07:00
cid
5fdaffe111 Patch to enforce json extension works in existing API behaviour
Currently, .json extensions are stripped out during the search or while
taking any action on a node through its name or uuid.

This pecan feature ensures that a reference to
``0178-0c2c-9c26-ca69-3011-a9dd.json`` is treated
as ``0178-0c2c-9c26-ca69-3011-a9dd``

If we had two nodes that differ by a .json extension in either of the
names, ``"node", "node.json"``, and we intend for the latter, we’ll
need to append an additional ".json" extension in the reference query,
else the node without the extension is treated as the default node,
and the extension node is only considered if it’s the only node with
the name.

Same workaround if we wanted our ``0178-0c2c-9c26-ca69-3011-a9dd.json``
correctly targeted, we append an additonal ".json" extension to our
query.

This patch tries to validate this behavior in API versions prior to
1.91, where this feature exists.

Change-Id: I613e596e8cf52f36b9c7caac30bdb3ff0d3bf821
2024-05-12 06:19:34 +01:00
Zuul
926db2e70a Merge "Remove agent_ipmitool/pxe_ipmitool tests" 2.10.0 zed-last 2024-05-06 09:53:28 +00:00
Julia Kreger
19d10067b4 Additional test state fixes
In running some tests downstream, in this case where someone had
aggressively asserted default interface values, some additional
tests failed, and in fun ways.

This changes a couple tests so they explicitly set and account
for differeing defaults from upstream CI. Also adds an inline note
on the Boot from Volume test which can fail if the volume creation
fails.

Change-Id: Ieaa7ac9d9058ba40955248699e8fd762d4b3c15d
2024-05-03 11:30:23 -07:00
Julia Kreger
b639340ee4 Remove agent_ipmitool/pxe_ipmitool tests
The drivers were removed a very very long time ago in a galaxy
far away. It no longer makes sense to keep them in the tempest
plugin.

Change-Id: Iadac0a41caea8bdbac9aedae83170eb81c331a05
2024-05-01 14:04:01 -07:00