Commit Graph

441 Commits

Author SHA1 Message Date
Julia Kreger 7241770603 Invoke tests with fake interfaces
So it turns out as highlighted by looking at bug 2054722
that you can end up creating nodes with "fake" hardware nodes
in the default config we test in the gate, which end up with
"fake" as the deploy_interface, but if you try to run the
same test against a production configured ironic deployment,
it fails because it likely ends up with a default of "agent"
as the deploy_interface.

Unfortunately, a review of test logs also reveals that the
same basic problem exists with the network_interface field
*as well*, where tests were written expecting the default
to be a fake or noop interface out of the box.

Note: This depends-on is to be removed before mering, it is
      enable additional issues to be identified.

Change-Id: Id0051d9b39bc0f46e3afee5bbfa8a2062114df80
2024-03-06 15:08:11 +00:00
Zuul f5bfe9b319 Merge "Test multiple boot interfaces as part of one CI job" 2024-03-06 03:27:33 +00:00
Julia Kreger 18eb2c4828 Test multiple boot interfaces as part of one CI job
The idea here came out of the 2024.1 PTG held in ?October? 2023,
with the goal of being able to exercise testing of boot interfaces
as a group in a single job, instead of spreading it out amongst
CI jobs with different scenarios.

That doesn't mean different scenarios are wrong, but as we add more
boot interfaces as part of supporting HTTPBoot, we cannot double
our scenarios.

In theory, the hope is we should be able to consolidate down several
secenario jobs into just one test running these jobs.

Change-Id: Id41ee40c36624387216b2cfc1501f01a3217b2af
2024-02-12 12:08:38 -08:00
Jay Faulkner f2b9c74c9c Basic API tests for sharding
Validates:
- Unfiltered requests get sharded nodes
- Filtering by a single shard
- Filtering by >1 shards
- Filtering by sharded nodes
- Filtering by unsharded nodes

Change-Id: Id37e8d6db098bb8decae87b6184bab4482321316
2024-02-08 14:48:50 -08:00
Zuul 53039461b0 Merge "Ensure scope logic is enforced" 2024-01-24 23:13:50 +00:00
Julia Kreger 638dcb7706 Ensure scope logic is enforced
Back after we added the new policies, at some point we should
have changed the default state for the tempest tests so they
assume/default to the understanding that Ironic is enforcing
scope and to use the appropriate client when launching tests,
because Ironic restructed it's access model to better align
with the overall community and further enable infrastructure
operators.

Closes-Bug: 2051137
Change-Id: I564af48698d20a150699933bf7e2e829b104ab04
2024-01-24 07:48:31 -08:00
Kyrylo Romanenko 95b901c3ff Add negative tests for VIF attach/detach operations
Add tests:
  test_vif_already_attached_on_internal_info
  test_vif_already_attached_with_portgroups
  test_vif_attach_no_free_port
  test_vif_attach_no_port
  test_vif_attach_with_empty_portgroup
  test_vif_attach_port_not_in_portgroup
  test_vif_attach_node_doesnt_exist
  test_vif_attach_no_args
  test_vif_detach_not_existing
  test_vif_detach_no_args

Closes-Bug: #1666534
Change-Id: I657fbecd37ceec424da6182507f324b653288857
2024-01-22 03:35:47 +04:00
Zuul 227a519fc9 Merge "Add test for dhcp-less vmedia based deployment" 2023-12-05 20:39:46 +00:00
Zuul 621ffd654c Merge "Cleanup py27 support" 2023-12-05 19:50:54 +00:00
Julia Kreger d8e25ec09f Add snmp variant of ramdisk iso boot test
Change-Id: I3e3849a9aefcc568dd39f3765d6b8e8784b2771a
2023-11-16 17:49:59 -08:00
Julia Kreger 793608a857 Add test for dhcp-less vmedia based deployment
Creating test to help facilitate the fix of bug 2032377 and
ultimately help ensure we have a backwards compatible fix.

The scenario:

* Creates a shiny new network without dhcp, and adds a router.
* Sets that network as the provisioning network for the node.
* Creates a port on that network, assigns that port as the VIF.
* Creates a configuration drive network_data.json file payload
* Triggers deployment, utilizing the aformentioned network_data
  payload and configuration drive.
* Once deployment has complete, attempts to ping the remote host.
* Once pingable, and this is configurable, it will then attempt
  to rebuild the remote host, basically forcing the condition
  covered in bug #2032377.
* Rebuild is completed, and the host is attempted to be pinged,
  again.

To facilitate this, three configuration options have been added.
Two are external network settings. Because there is no way in
a devstack configuration of neutron to advertise the next hop
router, we have to have a pre-assigned/configured IP on the
external network we can attach a router to. We also need to know
the external network ID.

Then there is basically a option flag if we wish to exercise the
pattern for bug 2032377. Ideally, this would be always, but with
the complexity and fact a non-stock IPA image is required, one
sort of needs to know and then configure as appropriate.

Change-Id: Ic848b8051e4d863f30d47c833d334afc879e4f20
2023-11-03 15:11:30 -07:00
Julia Kreger caae7cc6ec CI: Update job config for 2023.2 being a stable branch
Increment the jobs, in other words:
* Add jobs for 2023.2
* Mark Zed jobs non-voting
* Remove older jobs from the tempest plugin's normal execution
  as they were non-voting previously.

Change-Id: I27d852063a74938992c5cd37e45bfecf31aadd41
2023-11-03 06:26:26 -07:00
wangjiaqi07 1e52960c69 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py

Change-Id: Icd0649557b64ff9694ca444bd1d381bb9317992a
2023-08-08 15:41:57 +08:00
Harald Jensås 3c8235ed02 rbac - Fix vif_attach expected return values
Client vif_attach only return resp - not body.

On a system without policies enabled the test fail with
too maby values to unpack - which is confusing ...

Change-Id: I36bce09c9ffe31364d738809adabe65a3af8443f
2023-06-01 00:35:34 +00:00
Julia Kreger 3c43cf1eb7 CI: Add RBAC specific tempest jobs for main branch exec
Adds configs for Zed, 2023.1, but only runs the job on master
branch for now, while we sort out a policy fix needing to be
backported in ironic.

Gives us some initial feedback and forced testing while we fix
the other issues.

Change-Id: Ic435368a5840aae8dab26a843bd79e0ae2546639
2023-06-01 00:35:26 +00:00
Zuul d5c0acf722 Merge "Clarify checksum for wholedisk images." 2023-05-25 16:06:44 +00:00
Harald Jensås 72c5ed3351 Fix rbac indicator tests
Also disable test_reader_cannot_ipa_heartbeat,
will follow up.

Depends-On: https://review.opendev.org/882597
Change-Id: I966ae89333b6ad553b6f1398d61bc7d8f8b72c74
2023-05-24 07:57:18 -07:00
Julia Kreger c0d1a98555 CI: Advance stable jobs to 2023.1
- Create 2023.1 stable jobs
- Move yoga jobs to non-voting
- Remove wallaby non-voting jobs from being executed.

Change-Id: Ie30fd6ac8b208265cd6d56f7e94a69f472b5a7c4
2023-05-23 12:11:44 -07:00
Julia Kreger c228c68d72
Advance tempest plugin tests to Zed (mostly)
Also advances the anaconda job to 2023.1, since it fails
in a very odd way on Zed, and it looks like I might not have
had all of the CI related fixes on Zed.

Change-Id: Ib7142d2bfcf0cae84dbc647a5870a2e1d4768e25
2023-05-09 11:00:42 +02:00
Riccardo Pittau f29753262e Fix rbac tests
Fix the exceptions got from test_reader_cannot_get_indicator_state
and test_reader_cannot_ipa_heartbeat.

Also get_indicator_state takes only 2 arguments since the get_one()
function takes only 2 positional arguments besides self, node_uuid
and indicator.

Change-Id: I4b5399562ffddb6e603f457aef1423f1fe7ba93e
2023-05-04 14:58:32 +02:00
Zuul e121d9a943 Merge "Secure RBAC Test" 2023-05-04 00:35:15 +00:00
Julia Kreger ec74c1c0f4 Clarify checksum for wholedisk images.
Change-Id: I4ae825a09838dae198ff663cfc1e602b10bc7084
2023-05-02 12:58:39 -07:00
Zuul 04ad310fb0 Merge "Upgrade to latest hacking - v6" 2023-04-25 14:36:06 +00:00
Jay Faulkner 167098720e Upgrade to latest hacking - v6
Updated dep to latest hacking - 6.0.0

Change-Id: Ic5f2a98d2368f6a4aa4393ebccaee8c805761ce8
2023-04-21 12:39:38 -07:00
Julia Kreger e4756405cd
Secure RBAC Test
Enforce/test the state of each policy's engagement for
baremetal nodes, project reader and system reader.

The tests use a try clause, catches the exception and
checks the response status code match what is expected.

Change-Id: I0b5f8eb881462f5d78f65bd37fbb8b296d9880eb
2023-04-19 01:43:12 +02:00
Dmitry Tantsur 5952cbd6da Split the ramdisk ISO test
I have a feeling that class-level logic involving CONF does not work
because CONF is populated later.

Change-Id: I65c65faf55069a4c9d668e0e0ba06ffc8b6b43ed
2023-03-03 15:18:04 +01:00
Zuul 5ac31e71ea Merge "Disable use of the SSH agent for the rescue test" 2023-02-17 11:18:13 +00:00
Julia Kreger b4f8b42c8e Disable use of the SSH agent for the rescue test
Paramiko, by default, attempts agent based authentication before
ever attempting password based authentication. But this doesn't
work so well if the environment has an agent running or thinks it
has an agent running, because it breaks the rescue test.

Instead, explicitly tell the tempest and thus paramiko to *not* use
the ssh-agent functionality.

Depends-On: https://review.opendev.org/c/openstack/tempest/+/872566
Change-Id: Ia2870579c7398d359b8d360fe7d1e42abb79b299
2023-02-02 08:31:54 -08:00
Julia Kreger cda96d5ca3 Prevent protected node tests from orphaning test nodes
While investigating failures where four orphaned nodes
were observed after running the tempest plugin against an
operating environment, it was discovered that each node
was created by the TestProtectedNode class. A review of the
logs indicated that tearDown() was being called, but
resource_cleanup was never being called which houses the
unified resource cleanup. Upon reviewing the pattern
in tempest itself, generally resource_cleanup is used
instead of teardown, however with our class structure,
that doesn't seem to work, so instead we just
explicitly call to unset the protected state for each
node.

We should now be consistent, and the four TestProtectedNode
tests should no longer orphan four nodes when run.

Also added some additional logging to help spotting cases
where orphaned nodes might be occuring, in order to aid
in troubleshooting when reviewing Tempest logs.

Change-Id: I4dc6140f1dbcf1bb891fa522523957c1d8002df4
2023-01-20 18:04:22 +00:00
Zuul 6457709e6e Merge "OOB inspection timeout fix for iDRAC" 2023-01-07 16:30:51 +00:00
Riccardo Pittau e0b4af905e Fix tox4 error
Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.

Change-Id: Ic1cb9d8f0f555e05d35c7e2201187a0b82b48d4c
2022-12-28 15:03:45 +01:00
Kamlesh Chauvhan 30d1f902da OOB inspection timeout fix for iDRAC
Make inspection timeout configurable to fix iDRAC driver out of band
inspection intermittent timeout issue for idrac-wsman and idrac-redfish
inspect interface.
For idrac, at least 20 seconds is recommended to be set for inspect
timeout for successful execution of OOB inspection.

Change-Id: Ibdf78d0669d0afb43d32bb71e7710145ffb7c05e
2022-12-02 09:21:29 +00:00
Aija Jauntēva 4684f915b5 Fix typo: BaremetalIdracRedfishConfigurationMolds
Configuration in the class name was mistyped.

Change-Id: I349e4e2e3d7dcb90c25860b34d6be19b458ff584
2022-11-11 04:28:41 -05:00
Julia Kreger 982d177007 Tempest test for anaconda deploy
Provides a test and substrate changes to support integration
testing of the anaconda deployment interface from a "standalone"
perspect.

This is present in two forms, a "with stage2 ramdisk" and
"without stage2" test which is enabled, or not depening
on the underlying configuration.

This test also has two modes of operation, the first and
default being primarily a "did anaconda start and can I
ping the machine?" test mode. The second attempts to wait
for the node to reach an active state, although it is not
the default because an anaconda deployment, depending on
mode of use, even with a default configuration can take
a substantial amount of itme. The anaconda deployment
interface is also modeled for highly tuned configurations,
so the prime aspect is "does it boot? does anaconda start?"

Also:
* Removes the explicit requirement that test classes explicitly
  declare support for wholedisk_image or not.

Change-Id: I42933d26268b55737fa2508265643c1cd14651ea
2022-09-27 13:44:29 -07:00
Zuul a2c26c6ddf Merge "Add iDRAC Redfish configuration molds test" 2022-09-25 20:42:08 +00:00
Zuul 41c3ed3c21 Merge "Add iDRAC Redfish sync boot mode test" 2022-09-21 18:54:33 +00:00
Zuul 7b1644f3fb Merge "Swap maintenance fix to cleanup step" 2022-09-21 15:04:07 +00:00
Kamlesh Chauvhan 785620516c Add iDRAC Redfish configuration molds test
This adds test for idrac-redfish configuration molds for export and
import configuration steps.

Change-Id: If9337f9d7cee6009ce4df53e105b65fbcc95a9ba
2022-09-15 09:51:36 +00:00
Kamlesh Chauvhan 853164a480 Add iDRAC Redfish firmware update test
This adds test for firmware update using iDRAC redfish.

Change-Id: I87bacfabcaf94b9b80b884d6ab576058e7411f84
2022-09-05 11:00:42 +00:00
Swapnil Machikar 2e680f9f80 Add iDRAC Redfish sync boot mode test
This adds test for sync boot mode which changes boot mode
from 'bios' to 'uefi' and vice versa using iDRAC redfish

Change-Id: I43241204e71ab7e0d8c8929e216ce9473c3c2e1e
2022-08-26 09:38:04 +00:00
Zuul 50f0a715d5 Merge "Add iDRAC RAID cleaning steps tests" 2022-08-17 12:19:33 +00:00
Kamlesh Chauvhan 42656a0d8d Add iDRAC RAID cleaning steps tests
This adds tests for both the WS-Man and Redfish implementations
of the iDRAC RAID cleaning steps. In this test, storage inventory
input for RAID cleaning is provided by user in JSON format.
The storage inventory is validated against schema once at the
beginning of RAID tests execution and each test checks
test specific requirements before execution.

Change-Id: I183fdc47dbb7a12b2ffb4f8453753dada2d8f5fe
2022-08-08 17:14:15 +00:00
jiaqi07 ce437b7523 remove unicode from code
Change-Id: I23078d93d768deee0e8b93cbe254aea104e21f33
2022-08-06 08:58:53 +08:00
Zuul f461c928d2 Merge "Add iDRAC Redfish virtual media boot deploy test" 2022-07-22 00:53:49 +00:00
Zuul 2b2aa6115d Merge "Undo maintenace state on protected node tests" 2022-07-20 15:05:20 +00:00
Julia Kreger a766d8e426 Swap maintenance fix to cleanup step
Follow-up to I89839ecb0e08555ddcfee0289350fac1923b3958 to
use a cleanup step so the maintenance state is rolled back
regardless.

Change-Id: I52a5c36d8ca1965d866409fee4590cc1d151f238
2022-07-20 06:59:04 -07:00
Zuul 0255f1e9c1 Merge "Set minimal tempest version to 27.0.0" 2022-07-19 14:02:36 +00:00
Julia Kreger 8d176bd321 Undo maintenace state on protected node tests
As part of the protected from deletion test, we set a node into maintenance
state which allows override actions to be performed for node deletions.

The test is verifying the removal of the node is prevented. This fails upon
the TearDown class execution, resulting in a silent hidden failure which
cannot complete teardown because you cannot unprovision, as is in the
teardown step, a node in maintenance state.

Explicitly unset maintenance, and the world will be happy!

Change-Id: I89839ecb0e08555ddcfee0289350fac1923b3958
2022-07-13 13:10:49 -07:00
Swapnil Machikar b1c8a2b86f Add iDRAC Redfish virtual media boot deploy test
Change-Id: Ic2a46779e9ab5d0706fbbde0d6067b6b85e48add
2022-07-11 10:11:09 +00:00
Zuul c4a2e5e139 Merge "Add more deploy tests for idrac, redfish, ipmi" 2022-07-11 00:19:13 +00:00