Skip to content

[Storage] Add snapshot/restore tests across RHCOS 9 and RHCOS 10 (CNV-96772) - #1

Draft
Ahmad-Hafe wants to merge 1822 commits into
mainfrom
cnv-96772-snapshot-restore-mixed-rhcos
Draft

Ahmad-Hafe wants to merge 1822 commits into
mainfrom
cnv-96772-snapshot-restore-mixed-rhcos

Conversation

@Ahmad-Hafe

Copy link
Copy Markdown
Owner

Add two test stubs for snapshot/restore scenarios across RHCOS 9 and RHCOS 10. Tests marked with @pytest.mark.mixed_os_nodes. Jira: https://redhat.atlassian.net/browse/CNV-96772

rlobillo and others added 5 commits October 9, 2026 01:31
…edHatQE#5544)

##### What this PR does / why we need it:

De-quarantines `test_enable_fg_hco` (Polarion CNV-10091) and updates its
assertions to match the current HCO behavior.

HCO's `disableMDevConfiguration` feature gate no longer propagates
`DisableMDEVConfiguration` to KubeVirt's
`developerConfiguration.featureGates` list. Instead, HCO now syncs it to
`mediatedDevicesConfiguration.enabled = false` (inverted boolean) in the
KubeVirt CR.

**Changes:**
- Remove `@pytest.mark.xfail` quarantine decorator
- Remove unused imports and constants (`DEVELOPER_CONFIGURATION`,
`VALUE_STR`, `QUARANTINED`, `FEATUREGATE_NAME_KEY_STR`)
- Simplify parametrize (remove extra params `kubevirt_featuregate_name`
and `hco_featuregate`)
- Add `MEDIATED_DEVICES_CONFIGURATION` constant
- New assertions verify:
  1. HCO `featureGates.disableMDevConfiguration == True`
  2. KubeVirt `mediatedDevicesConfiguration.enabled == False`

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:
Should be backported to cnv-4.22 too. 

##### jira-ticket:
https://issues.redhat.com/browse/CNV-79304

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated upgrade/install test coverage to reflect the current
feature-gate behavior.
* Added validation for mediated device configuration being disabled when
the related feature gate is enabled.
  * Simplified test parameter handling for clearer assertions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
##### What this PR does / why we need it:
The Jira is resolved, so the memory/CPU override in
fedora_vm_for_hotplug_scope_class is no longer needed.
##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:

Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…PRs (RedHatQE#5604)

## Summary
- Add CodeRabbit **pre-merge checks** for STP scenario coverage (linked
design-docs repo) and `special_infra` marker enforcement on new tests.
- Add **`tests/**` path instructions** so STP gaps are posted as
**inline review comments** on the `STP:` line, not only in PR
conversation chat.
- Update **AGENTS.md** with STP scenario coverage rules and
`special_infra` marker requirements aligned with `pytest.ini`.

##### What this PR does / why we need it:
CodeRabbit linked-repo STP analysis worked in chat but findings were
hard to see on PRs. This change makes STP mismatch and missing
`special_infra` marker violations visible in the pre-merge checks table
and (for STP) as inline file comments, and documents the same rules in
AGENTS.md for humans and AI reviewers.

##### Which issue(s) this PR fixes:


##### Special notes for reviewer:
- Two new custom pre-merge checks (`STP scenario coverage`,
`special_infra marker required`) join the existing `STP link required`
check.
- Triggering markers for `special_infra` are listed explicitly;
`single_nic`, `remote_cluster`, `mixed_os_nodes`, `cclm`, and
operator-only markers are exempt.
- After merge, validate on an STD PR with partial STP coverage — expect
❌ in pre-merge checks and an inline comment on the STP line.

##### jira-ticket:
NONE


Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated testing guidance to require traceability between referenced
scenarios and test declarations.
* Clarified alignment requirements for test preconditions, steps, and
expected results.
* Documented when special infrastructure markers are required for tests.

* **Chores**
* Added automated review checks to flag missing scenario coverage and
required infrastructure markers.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: rnetser <rnetser@redhat.com>
…dHatQE#5118)

##### What this PR does / why we need it:
replace pexpect.spawn with pty+subprocess to avoid forkpty

- Replace pexpect.spawn with pty.openpty() + subprocess.Popen to avoid
deprecated os.forkpty() in Python 3.12+ multi-threaded processes
- Add _spawn_console() to create a pty pair and wrap the subprocess in
pexpect.fdpexpect.fdspawn
- Add _terminate_proc() to cleanly shut down the subprocess, call it in
both the connect error path and disconnect cleanup
- Simplify console_eof_sampler() — remove parameters, use
_spawn_console() internally

##### Which issue(s) this PR fixes:
DeprecationWarning on `test_vm_console`

##### Special notes for reviewer:
The following warning was shown:

`/tmp/pr-tests/.local/share/uv/python/cpython-3.14.5-linux-x86_64-gnu/lib/python3.14/pty.py:66:
DeprecationWarning: This process (pid=110) is multi-threaded, use of
forkpty() may lead to deadlocks in the child.`

##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->
NONE


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Updated the VM console connection to use a PTY-backed subprocess
workflow for more reliable interactive sessions.
* Improved connection teardown and EOF/sampling behavior, ensuring
console sessions terminate cleanly and reducing orphaned processes.
* **Tests**
* Expanded console unit test coverage for PTY/subprocess setup, error
cleanup during connect, graceful vs forced termination, and updated EOF
sampling expectations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: rkishner <rkishner@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…QE#5546)

##### What this PR does / why we need it:
Move `validate_metrics_value` from `tests/observability/utils.py` to
`utilities/monitoring.py` for cross-directory reuse.
Now accepts `str | int` expected_value (int 0 for absent metrics).
Add unit tests. Update all observability callers.

##### Which issue(s) this PR fixes:
Allows another packages to verify metrics tests.

##### Special notes for reviewer:

##### jira-ticket:
NONE


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Consolidated metric polling and validation into a shared monitoring
helper for consistent observability checks.
* Updated observability-related tests (including upgrade scenarios) to
use the shared helper.
  * Removed duplicated metric-validation logic from the test utilities.
* **Tests**
* Added unit tests covering successful metric matching, type-sensitive
comparisons, and timeout/error behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Harel Meir <hmeir@redhat.com>
yossisegev and others added 22 commits October 9, 2026 01:31
##### Which issue(s) this PR fixes:
Removes the skip marker for the closed bug CNV-88747.

##### Special notes for reviewer:
The previously blocked test passes with the Jira marker removed.

##### jira-ticket:
CNV-88747

Signed-off-by: Yoss Segev <ysegev@redhat.com>
Co-authored-by: Yossi Segev <ysegev@ysegev-thinkpadp1gen8.raanaii.csb>
##### What this PR does / why we need it:

Move virt-domain fixtures from the monolithic `tests/conftest.py` into
domain-scoped modules under `tests/fixtures/virt/`:

- `instance_types.py` — instance type and VM preference fixtures
- `migration.py` — migration policy and `migrated_vm_multiple_times`
fixtures
- `osinfo.py` — libosinfo DB download fixtures
- `ssh.py` — SSH key generation fixtures
- `templates.py` — `base_templates` fixture
- `virtual_machines.py` — VM creation fixtures, `rhel_latest_os_params`,
`vm_for_migration_test`

Register new modules in `pytest_plugins` in root `conftest.py`.

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

Part of series of `tests/conftest.py` refactor.

##### jira-ticket:

https://redhat.atlassian.net/browse/CNV-80951

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Reorganized virtualization test setup into focused areas for VM
lifecycle, migration, instance types, OS information, SSH access,
templates, and VM actions.
* Added reusable setup for VM creation and migration scenarios, SSH
access, template retrieval, and process management.
  * Updated test fixture discovery and corrected plugin handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: vsibirsk <vsibirsk@redhat.com>
RedHatQE#6412)

##### What this PR does / why we need it:

VirtPlatformAutopilotMachineConfigUpdateStaged is an informational alert
so doesn't need a runbook. Add a skip list to `test_runbook_url` that
excludes the alert

##### Which issue(s) this PR fixes:

Failures in `test-pytest-cnv-5.0-observability-ocs`

##### Special notes for reviewer:

##### jira-ticket:
https://redhat.atlassian.net/browse/CNV-98304


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Informational machine configuration update alerts are now validated
without requiring a runbook URL. Other alerts continue to be checked for
their runbook URLs, preserving existing validation behavior for those
alerts.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: albarker-rh <albarker@redhat.com>
##### What this PR does / why we need it:
- Implements the `TestVMTemplateUpgrade` test class, converting STD
placeholder tests into working upgrade-continuity tests.
- Adds conftest.py, constants.py, and utils.py for the vm_template test
module,
 - add `VM_TEMPLATE_NODE_ID_PREFIX in upgrade_params.py.

##### Which issue(s) this PR fixes:
The source VM is deleted after `VirtualMachineTemplateRequest` captures
it, it doesn't need to persist across the upgrade

##### Special notes for reviewer:
**STP P2 scenario exclusions (capability-disable and disable→reenable
recovery):**
These two scenarios are not covered in this PR because the VM Template
capability is enabled by default in CNV 4.23 / OpenShift Virtualization
5.0+. Testing the disable/reenable flow is only meaningful on 4.22 where
the feature flag can be toggled. A separate follow-up covering those
scenarios on the 4.22 stream will be tracked in
[CNV-97433](https://redhat.atlassian.net/browse/CNV-97433).

##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->
https://redhat.atlassian.net/browse/CNV-96840

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Expanded upgrade-continuity coverage for VM templates, template
requests, and virtual machines.
* Added checks that templates remain ready and can create new VMs after
an upgrade.
* Improved test reliability with shared setup, readiness checks, and
ordered pre- and post-upgrade scenarios.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: rkishner <rkishner@redhat.com>
…stop status (RedHatQE#6280)

##### What this PR does / why we need it:
Wires the shared `dv_stop_status_restart_threshold` stop-status guard
into the `wait_for_dv_success()` calls in `tests/storage/general/` whose
effective timeout is >= 10 minutes: the `TIMEOUT_12MIN` importer wait in
`conftest.py` and the default-timeout (10 min) `fedora_data_volume` wait
in `test_storage_behavior.py`. Without the guard these waits block until
the full timeout when an importer restarts excessively; reusing the
existing shared helper (already used by `cdi_clone`/`golden_image`)
makes them fail fast.

##### Which issue(s) this PR fixes:
https://issues.redhat.com/browse/CNV-94468

##### Special notes for reviewer:
No new function was added — the existing shared
`tests/storage/stop_status_utils.py:dv_stop_status_restart_threshold` is
reused. Only calls with an effective timeout >= 10 minutes are guarded;
the `TIMEOUT_5MIN` wait is intentionally left unchanged. No behavior
change on the success path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

##### jira-ticket:
https://issues.redhat.com/browse/CNV-94468

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Improved storage test reliability by waiting for data volume
operations to reach the expected restart threshold.
* Updated test setup and validation to use the relevant data volume
context when monitoring operation completion.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Adam Cinko <acinko@redhat.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
##### What this PR does / why we need it:
In DataVolume object, you can pass stop_status_func and
stop_status_func_kwargs into .wait_for_dv_success method and make it
fail sooner than the set timeout. The stop_status_func is passed in the
sampler and checked every second so you can inject checking DV status or
if the DV creation restarted 3 times, etc. and stop it preliminary based
on real status, not timeout.

This will reduce the time for some storage tests because the method
won't have to solely wait for timeout to fail.

This implements the DV Stop status function in `cdi_upload` module.

##### Which issue(s) this PR fixes:
https://redhat.atlassian.net/browse/CNV-94181

##### Special notes for reviewer:
Signed-off-by: Claude Opus 4.6
[noreply@anthropic.com](mailto:noreply@anthropic.com)

##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Updated automated checks for upload completion to account for
DataVolumes that may restart after reaching a successful state. Coverage
now validates this behavior across both upload workflows, helping ensure
completion is assessed consistently. No end-user functionality has
changed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Adam Cinko <acinko@redhat.com>
##### What this PR does / why we need it:
Implement the two STD placeholders in

tests/observability/metrics/rhel9_rhel10_cluster/test_migration_metrics.py,
verifying that migration metrics are reported for cross-version live
migration between RHCOS 9 and RHCOS 10 worker nodes. Each test uses a
dedicated MigrationPolicy with allow_post_copy=False, avoiding CNV-84023
(postcopy fails on RHCOS 10.2) entirely, and checks migration metrics
via subtests over a shared metric list plus a duration check. The two
metrics affected by CNV-97013 (memory transfer rate, dirty memory rate)
dynamically xfail while that bug stays open.

Relocate RHCOS9_AFFINITY/RHCOS10_AFFINITY and set_vm_affinity() from the
virt team's local utils.py to utilities/constants/cluster.py and
utilities/virt.py, since they are now shared by both the virt and
observability team test directories.

assisted by: claude code claude-sonnet-5
##### Which issue(s) this PR fixes:

##### Special notes for reviewer:
coverage-omitted utilities/virt.py; both branches of
get_or_create_golden_image_data_source and
get_data_volume_template_dict_with_default_storage_class are exercised
by the integration tests in this PR.
##### jira-ticket:
https://redhat.atlassian.net/browse/CNV-96865


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Added coverage for migration metrics during RHCOS 9-to-10 and 10-to-9
migrations of RHEL and Windows virtual machines.
- Checks that migration start and end times are reported and that other
migration metrics have positive values.
  - Waits for migration success before checking the reported end time.
- Marks checks for metrics affected by a known issue as expected
failures while that issue remains open.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Ohad <orevah@redhat.com>
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [astral-sh/uv](https://redirect.github.com/astral-sh/uv) | uses-with |
patch | `0.12.21` → `0.12.23` |

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

###
[`v0.12.23`](https://redirect.github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#01223)

[Compare
Source](https://redirect.github.com/astral-sh/uv/compare/0.12.22...0.12.23)

Released on 2026-10-03.

##### Python

- Add CPython 3.15.0rc3
([#&#8203;22164](https://redirect.github.com/astral-sh/uv/pull/22164))

##### Preview features

- Sync from `uv.lock` without a workspace manifest using `uv sync
--frozen` with `frozen-lockfile`
([#&#8203;22018](https://redirect.github.com/astral-sh/uv/pull/22018))
- Export from `uv.lock` without a workspace manifest using `uv export
--frozen` with `frozen-lockfile`
([#&#8203;22007](https://redirect.github.com/astral-sh/uv/pull/22007))
- Inspect dependency trees from `uv.lock` without a workspace manifest
using `uv tree --frozen` with `frozen-lockfile`
([#&#8203;22016](https://redirect.github.com/astral-sh/uv/pull/22016))
- Inspect workspace metadata and optionally sync its environment from
`uv.lock` without a workspace manifest using `uv workspace metadata
--frozen` with `frozen-lockfile`
([#&#8203;22017](https://redirect.github.com/astral-sh/uv/pull/22017),
[#&#8203;22018](https://redirect.github.com/astral-sh/uv/pull/22018))

##### Bug fixes

- Reject alternate sources for workspace members across conflicting
dependency selections, avoiding lockfiles that cannot be installed
([#&#8203;22153](https://redirect.github.com/astral-sh/uv/pull/22153))
- Allow x86-64 Python interpreters running under emulation on Windows
ARM64 to install compatible `win_amd64` wheels instead of building from
source
([#&#8203;22099](https://redirect.github.com/astral-sh/uv/pull/22099))

###
[`v0.12.22`](https://redirect.github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#01222)

[Compare
Source](https://redirect.github.com/astral-sh/uv/compare/0.12.21...0.12.22)

Released on 2026-10-01.

##### Python

- Add CPython 3.10.22, 3.11.17, 3.12.15, 3.13.16, and 3.14.8
([#&#8203;22147](https://redirect.github.com/astral-sh/uv/pull/22147))

##### Enhancements

- Accept uppercase release suffixes in wheel platform tags
([#&#8203;22113](https://redirect.github.com/astral-sh/uv/pull/22113))
- Record workspace-member default groups in lockfiles
([#&#8203;22010](https://redirect.github.com/astral-sh/uv/pull/22010),
[#&#8203;22103](https://redirect.github.com/astral-sh/uv/pull/22103))
- Record workspace-member dependency-group Python requirements in
lockfiles
([#&#8203;22044](https://redirect.github.com/astral-sh/uv/pull/22044),
[#&#8203;22103](https://redirect.github.com/astral-sh/uv/pull/22103))
- Record default groups for non-project workspace roots in lockfiles
([#&#8203;22104](https://redirect.github.com/astral-sh/uv/pull/22104))
- Record dependency-group Python requirements for non-project workspace
roots in lockfiles
([#&#8203;22104](https://redirect.github.com/astral-sh/uv/pull/22104))
- Format URLs and paths consistently in CLI messages
([#&#8203;21937](https://redirect.github.com/astral-sh/uv/pull/21937))
- Hide the unsupported `--offline` option from `uv publish` help
([#&#8203;22124](https://redirect.github.com/astral-sh/uv/pull/22124))

##### Preview features

- Honor `--no-default-groups` in `uv audit`
([#&#8203;22090](https://redirect.github.com/astral-sh/uv/pull/22090))
- Report a clear error when `uv audit` or `uv tool audit` runs offline
and hide the unsupported option from help
([#&#8203;22114](https://redirect.github.com/astral-sh/uv/pull/22114))

##### Configuration

- Add `UV_PYTHON_ARCH` to select an interpreter architecture
independently of its Python version
([#&#8203;22098](https://redirect.github.com/astral-sh/uv/pull/22098))

##### Performance

- Reduce uv's binary size by compressing embedded Python download
metadata
([#&#8203;22126](https://redirect.github.com/astral-sh/uv/pull/22126))

##### Bug fixes

- Verify unchanged requirements against existing lockfile hashes when
relocking
([#&#8203;22083](https://redirect.github.com/astral-sh/uv/pull/22083))
- Honor dependency-group Python requirements at non-project workspace
roots
([#&#8203;22101](https://redirect.github.com/astral-sh/uv/pull/22101))
- Use each selected workspace member's recorded default groups during
frozen sync
([#&#8203;22015](https://redirect.github.com/astral-sh/uv/pull/22015))
- Avoid false entry-point warnings for required workspace members
([#&#8203;22112](https://redirect.github.com/astral-sh/uv/pull/22112))

##### Other changes

- Raise the minimum supported Rust version for building uv to 1.97 and
update the toolchain to Rust 1.99
([#&#8203;22121](https://redirect.github.com/astral-sh/uv/pull/22121))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "after 18:00 on Friday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/RedHatQE/openshift-virtualization-tests).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMjUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:

| Update | Change |
|---|---|
| lockFileMaintenance | All locks refreshed |

🔧 This Pull Request updates lock files to use the latest dependency
versions.

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/RedHatQE/openshift-virtualization-tests).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMTIuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjExMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
##### What this PR does / why we need it:
The descheduler may churn through other eviction candidates before
selecting a virt-launcher, so allow more cycles for a VM to migrate off
the overloaded node.

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated migration checks to allow more time for the descheduler to
select a virtual machine for migration, accommodating cases where it
processes other eviction candidates first. No user-facing functionality
changed.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Denys Shchedrivyi <dshchedr@redhat.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…RedHatQE#6426)

##### What this PR does / why we need it:
Move written_files_to_mounted_hotplugged_disks from
@pytest.mark.usefixtures into the test parameter list for
test_vm_storage_class_migration_with_hotplugged_volume. This ensures the
fixture is set up before storage migration runs, so later data-integrity
checks are valid.


##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:
https://redhat.atlassian.net/browse/CNV-98245



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Updated the hotplugged-volume migration test to request its fixture
directly; test inputs and verification remain unchanged.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Noam Berko Laor <nberkola@redhat.com>
…edHatQE#6436)

##### What this PR does / why we need it:
Remove redundant test

Basically, it is an ordinary node-drain migration to the single
remaining node, so it is an extra case that adds no distinct coverage.
It also requires an additional node drain - which is nice to avoid,
especially on compact clusters.

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Removed the test covering VM migration when multiple nodes are
unschedulable.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Denys Shchedrivyi <dshchedr@redhat.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…#6358)

##### What this PR does / why we need it:
Network session setup (`network_sanity` → `hosts_common_available_ports`
→ `nodes_active_nics`) crashes with `KeyError: 'bridge'` when a
NodeNetworkState interface is typed `linux-bridge` or `ovs-bridge` but
has no `bridge` section. That is valid nmstate data (empty OVN bridges
such as `br-ex`/`br-int`, or a bridge with no ports). The fixture
treated those keys as required, so the entire network lane failed in
setup before any test ran.

Treat missing `bridge`, `link-aggregation`, and `ipv4` sections as empty
so NIC discovery continues. Physical NICs are still marked occupied only
when NNS actually lists them as linux-bridge / ovs-bridge / bond ports
(the existing filter).

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:
Test-automation bug only; not a CNV/nmstate product defect. Fixture-only
change in `tests/fixtures/network/node_nics.py` (coverage-omitted path);
behavior is exercised by `network_sanity` setup.

##### jira-ticket:
NONE

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Network interface test fixtures now handle missing bridge,
link-aggregation, port, and IPv4 details without raising errors. Missing
optional settings are treated as empty, allowing network checks to
continue when those details are absent. Existing behavior is unchanged
when network settings are provided. This improves the reliability of
checks for configurations with incomplete optional network information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Harshitha MS <harshitha.ms@ibm.com>
…ion (RedHatQE#6307)

##### What this PR does / why we need it:

KubeVirt v1.8 (kubevirt/kubevirt#16404) added `direct` and `extended`
sub-fields to the Hyper-V TLBFlush feature. These options improve
Windows guest performance.

This PR adds automation coverage for the new sub-features:

- Enables `tlbflush.direct` and `tlbflush.extended` in the Fedora common
template `HYPERV_DICT`

- Verifies both sub-features in `check_vm_xml_hyperv()` libvirt XML
checks, following the existing `stimer.direct` pattern

- Adds unit tests for both failure paths

- Updates all existing unit test mock data to include the new sub-fields

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:

NONE

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Hyper-V validation now checks the feature settings configured for each
virtual machine, including TLB flush direct and extended modes.
- Checks detect missing features and subfeatures, verify enabled states
and spinlock retry values, and correctly match the configured timer
name.
- **Tests**
- Expanded coverage for feature subsets, missing or disabled settings,
and Fedora and Windows virtual machine configurations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Samuel Albershtein <salbersh@redhat.com>
…edHatQE#6430)

##### What this PR does / why we need it:

On FIPS-enabled clusters, the `ocp-virt-validation-checkup-rhel9` image
uses RHEL 9.8 as base with the system Python interpreter. The system
Python links `hashlib` against RHEL's system OpenSSL, which enforces
FIPS mode when the cluster has FIPS enabled
(`/proc/sys/crypto/fips_enabled = 1`).

In FIPS mode, `hashlib.md5()` without `usedforsecurity=False` raises
`UnsupportedDigestmodError`, causing all SSH connectivity checks into
VMs to fail:

```
Function: rrmngmnt.host.run_command  Kwargs: {'command': ['exit'], 'tcp_timeout': 60}
Last exception: UnsupportedDigestmodError: [digital envelope routines] unsupported.
```

**Root cause:** `paramiko.pkey.md5` (imported from `hashlib`) is called
by:
- `PKey.get_fingerprint()` — used for display/logging of host key
fingerprints in all host key policies (`AutoAddPolicy`, `RejectPolicy`,
`WarningPolicy`) and during SSH client auth
- `PKey._read_private_key_pem()` — used for password-protected PEM key
decryption

CI (Jenkins) uses the `openshift-virtualization-tests:latest` image
(Fedora 41 + `uv` standalone Python) which bundles its own OpenSSL that
does not inherit the host FIPS policy — hence no failure there.

**Upstream status:** Known paramiko bug ([issue
RedHatQE#396](paramiko/paramiko#396), open since
2014). Multiple PRs submitted
([RedHatQE#1928](paramiko/paramiko#1928),
[RedHatQE#2189](paramiko/paramiko#2189),
[RedHatQE#2496](paramiko/paramiko#2496),
[RedHatQE#2624](paramiko/paramiko#2624)) — none merged.
No fix in `paramiko 5.0.0`.

**Fix:** Patch `paramiko.pkey.md5` at import time via `vars()` to use
`usedforsecurity=False`. This tells OpenSSL FIPS that the MD5 usage is
not for security purposes (fingerprint display/logging only).

**Validated on a FIPS-enabled cluster:**
`test_clone_from_block_to_fs_using_dv_template` fails without the patch
and passes with it on the `ocp-virt-validation-checkup-rhel9` image.

##### Which issue(s) this PR fixes:

CNV-98463

##### Special notes for reviewer:

`vars(paramiko.pkey).update(...)` is used instead of direct attribute
assignment to avoid mypy `attr-defined`/`method-assign` errors on
third-party module patching, without requiring `# type: ignore`
(prohibited by AGENTS.md) or a broad `ignore_errors` mypy override.

##### jira-ticket:

CNV-98463

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Improved compatibility for automated test runs in FIPS-enabled
environments. Application behavior and user-facing functionality are
unchanged; this update affects test setup only and does not alter
security protections. No new end-user features or other behavior changes
are included.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…mespace clone (RedHatQE#6195)

##### What this PR does / why we need it:
From QE Storage lead I got comment it may be better to have more
granular permissions: "view" + "cdi.kubevirt.io:clone-sourcer", as this
is what we will recommend to customers. It would be good to have the
same in the tests.

Granular built-in ClusterRoles that together grant the least-privilege
permissions to clone
golden images across namespaces (the combination recommended to
customers): read access to the
source images (``view``) plus permission to clone from the source PVCs
(``cdi.kubevirt.io:clone-source``).

##### Which issue(s) this PR fixes:
[CNV-96366](https://redhat.atlassian.net/browse/CNV-96366)

##### Special notes for reviewer:
Co-Authored: Opus 4.8 <noreply@anthropic.com>

##### jira-ticket:
NONE


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Updated validation environment access and resource lookups for Windows
image testing.
  * No user-facing functionality changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Adam Cinko <acinko@redhat.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
##### What this PR does / why we need it:
In DataVolume object, you can pass stop_status_func and
stop_status_func_kwargs into .wait_for_dv_success method and make it
fail sooner than the set timeout. The stop_status_func is passed in the
sampler and checked every second so you can inject checking DV status or
if the DV creation restarted 3 times, etc. and stop it preliminary based
on real status, not timeout.

This will reduce the time for some storage tests because the method
won't have to solely wait for timeout to fail.

This implements the DV Stop status function in `cdi_import` module.

##### Which issue(s) this PR fixes:
https://redhat.atlassian.net/browse/CNV-94181

##### Special notes for reviewer:
Signed-off-by: Claude Opus 4.6 <noreply@anthropic.com>

##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Tests**
- Updated automated checks to account for DataVolume stop-and-restart
thresholds while waiting for successful HTTP and public registry
imports.
- Applied the updated wait behavior to secure-image, authenticated,
blank-disk, and low-capacity import scenarios, as well as relevant VM
and pod workflows.
  - Preserved existing timeout settings for the affected waits.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Adam Cinko <acinko@redhat.com>
…edHatQE#6206)

##### What this PR does / why we need it:
- Add support for --upgrade_custom=cnv flag to retrieve CNV version
explorer URL
- Mirrors existing logic for --upgrade eus/cnv flags
- Add unit test for upgrade_custom=cnv scenario

##### Which issue(s) this PR fixes:
Fixes custom upgrade lane version explorer URL retrieval
##### Special notes for reviewer:

##### jira-ticket:
https://redhat.atlassian.net/browse/CNV-96592


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* CNV Version Explorer URLs are now recognized for standard CNV upgrades
and custom CNV upgrades, alongside existing install and EUS upgrade
configurations.

* **Tests**
* Added coverage for standard CNV upgrades and custom CNV and EUS
upgrade options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Harel Meir <hmeir@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
##### What this PR does / why we need it:
update main to point to 5.1

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
  * Updated the package version to 5.1.
  * Refreshed issue references and test tracking for the 5.1 release.

* **User Impact**
  * No user-facing behavior changes are included in this update.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: vsibirsk <vsibirsk@redhat.com>
##### What this PR does / why we need it:

This standardizes traceability for every new product test: each test
must carry its own exact `STP: <URL>` when an STP exists, or a `Jira:
<URL>` fallback when none exists. Module- or class-only links do not
cover a new test. Manual placeholders are classified with
`@pytest.mark.manual`, have effective `__test__ = False`, and remove
both controls when automated; manual tests are registered. The STD
guide, `AGENTS.md`, and CodeRabbit rules are synchronized, including
enclosing suppression-change checks and unchanged placeholder siblings.
Utility/tooling tests are exempt.

The follow-up commit expands the change from the four
policy/configuration files to exactly nine files by adding 40 direct
`@pytest.mark.manual` markers to five existing STD files:

- `tests/network/upgrade/test_udn.py`: 2 markers (UDN network upgrade)
- `tests/storage/cbt/test_cbt.py`: 10 markers (CBT)
-
`tests/storage/storage_migration/test_storage_class_migration_cleanup.py`:
16 markers (migration cleanup)
-
`tests/storage/storage_migration/test_storage_class_online_offline_migration.py`:
8 markers (online/offline migration)
- `tests/virt/node/gpu/vgpu/test_rhel_vm_with_mig_vgpu.py`: 4 markers
(MIG vGPU)

These are direct decorator-only classifications of existing tests. Their
docstrings, test bodies, and effective `__test__ = False` behavior are
unchanged; there are no new test definitions and no legacy traceability
rewrite. There is no utility behavior change, so no new utility unit
tests are needed.

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

The exact live diff is four policy/configuration files
(`.coderabbit.yaml`, `AGENTS.md`, `docs/SOFTWARE_TEST_DESCRIPTION.md`,
and `pytest.ini`) plus the five existing STD files listed above: exactly
nine changed files and 40 added manual markers. This policy maintenance
and decorator-only STD classification is not a new feature. No issue was
created, per the user decision. Existing legacy links are preserved.

The exact follow-up commit is
`8c8daa485923d352f2266aff7df94cc3d8146dd4`, with tree
`e0fba76b24285f91e46e469f5816200aca60cc7e`; hooks ran. Validation passed
in isolation against the upstream baseline: `uv run --with pre-commit
pre-commit run --all-files`, live schema validation, gitleaks, full tox
across six environments, 888 utility tests at 98.95% coverage, and 16
STD-example checks. The `--with` tools were not project-installed and no
hook bypass was used. No cluster execution is claimed.

Six focused reviews found the change clean; no additional review round
was requested. No new utility tests are needed because utility behavior
is unchanged.

##### jira-ticket: NONE


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Updated the software test guide with clearer requirements for linking
product tests to their specifications or issue records.
* Clarified how manual test placeholders are marked, kept out of
automated test runs, and updated when automation is added.
* Specified which test categories are covered by these requirements and
how existing test links should be preserved.
* **Chores**
* Updated pre-merge checks to validate test traceability and
manual-placeholder requirements.

<!-- end of auto-generated comment: release notes by CodeRabbit -->

---------

Signed-off-by: rnetser <rnetser@redhat.com>
Co-authored-by: PI (gpt-5.6-luna) <noreply@pi.dev>
…d Windows 11 WSL2 (RedHatQE#6089)

##### What this PR does / why we need it:

Windows 10 has reached End of Life.(Refer -
https://support.microsoft.com/en-us/windows/deployment/updates-lifecycle/windows-10-support-has-ended-on-october-14-2025)
This removes win-10 from the test
matrix and replaces all Windows 10 test references with Windows 11.

- Removed `win-10` from `windows_os_list` (amd64 and multiarch configs)
- Removed the `win-10` entry from `WINDOWS_OS_MAPPING` in
`utilities/os_utils.py`
- Removed `WINDOWS_10`, `WINDOWS_10_TEMPLATE_LABELS`, `WINDOWS_10_WSL`
constants
- Replaced Windows 10 with Windows 11 in: GPU passthrough, vGPU, OOM,
  memory-load migration, WSL2, tablet device, and guest tools tests
- Consolidated WSL2 longevity params to Windows 11 only (changed from
  list to dict since only one entry remains)
- Removed the Win 10 network interface name conditional in longevity
  MTU setup (now always uses "Ethernet Instance 0")
- Updated unit tests accordingly

Image constants (`WIN10_IMG`, etc.) and base template existence checks
for `windows10` are intentionally retained - the images still exist on
infrastructure and KubeVirt still ships the templates.

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:

##### jira-ticket:
https://issues.redhat.com/browse/CNV-77964

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Changes**
- Windows 10 is no longer included in supported Windows test
configurations or image options.
- Windows 11 is used for WSL2, GPU passthrough, migration, guest tools,
memory-load, OOM, and longevity scenarios.
- Windows test configurations cover Windows Server 2019, Windows 11,
Windows Server 2022, and Windows Server 2025.
- **Tests**
- Updated operating-system mapping and matrix checks to reflect the
revised Windows coverage.
- **Documentation**
  - Updated the IBM Cloud Windows test example to use Windows 11.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: akeskar <akeskar@redhat.com>
##### What this PR does / why we need it:

These tests inherited their STP or Jira link from the module or class
docstring and now repeat it in their own test docstring, satisfying the
per-test traceability rule merged in RedHatQE#6473.

##### Which issue(s) this PR fixes:


##### Special notes for reviewer:

This is documentation-only (docstring traceability lines; no test logic,
assertions, markers or fixtures changed). Previously undocumented tests
received accurate STD docstrings derived from their actual behavior.
This PR is split by team folder; sibling PRs exist for the other teams.
Validation: mechanical verification confirmed every inserted link
matches its enclosing module/class URL and Jira lines retain the inline
`# <skip-jira-utils-check>`; all branches compile; pre-commit passed
16/16 hooks on all five branches; full tox passed on representative
branches with utilities unit tests 888 passed at 98.95% coverage.

##### jira-ticket:
NONE

Signed-off-by: rnetser <rnetser@redhat.com>
@Ahmad-Hafe
Ahmad-Hafe force-pushed the cnv-96772-snapshot-restore-mixed-rhcos branch from 714b47e to 9bc6b96 Compare October 8, 2026 22:32
… (CNV-96772)

Software Test Description for snapshot/restore test scenarios across RHCOS versions.

Defines test structure, docstrings, preconditions, steps, and expected results for:
- test_snapshot_rhcos9_restore_rhcos10: Snapshot on RHCOS 9 → Restore on RHCOS 10
- test_snapshot_rhcos10_restore_rhcos9: Snapshot on RHCOS 10 → Restore on RHCOS 9

Includes fixtures and test framework setup.

STP: https://github.com/RedHatQE/openshift-virtualization-tests-design-docs/blob/main/stps/sig-virt/dual-stream-cluster-rhcos9-rhcos10/storage.md

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
@Ahmad-Hafe
Ahmad-Hafe force-pushed the cnv-96772-snapshot-restore-mixed-rhcos branch 2 times, most recently from d2923bf to a744d94 Compare October 8, 2026 22:34
Ahmad-Hafe pushed a commit that referenced this pull request Oct 8, 2026
@Ahmad-Hafe
Ahmad-Hafe force-pushed the cnv-96772-snapshot-restore-mixed-rhcos branch from a744d94 to a54c84b Compare October 8, 2026 22:36
Ahmad-Hafe pushed a commit that referenced this pull request Oct 14, 2026
…#6418)

##### What this PR does / why we need it:

`test_restore_multiple_namespaces` failed while the restored guest was
still booting. `Console` treated the kernel banner `#1 SMP` as a shell
prompt, skipped login, and typed the file check into the boot console.
Pytest then reported only the `disconnect()` timeout.

This was introduced by
RedHatQE#6049,
which correctly accepts an already-logged-in session but reused the bare
`#` and `$` prompt patterns.

The default prompt now requires a trailing space (`# ` / `$ `), so a
real prompt still matches and `#1 SMP` does not. The login wait is 2
minutes unless the caller passes `timeout`. A missing prompt fails once.
`EOF` while `virtctl` is not up still retries.

##### Which issue(s) this PR fixes:

##### Special notes for reviewer:


##### jira-ticket:
NONE


Made with [Cursor](https://cursor.com)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Console commands retain a 30-second default timeout, while login and
shell-prompt waits default to two minutes. Virtual-machine console
readiness uses the two-minute login timeout.
* Shell prompt detection is more precise, reducing the chance that
startup messages are mistaken for a ready prompt.
* Connection attempts retry at ten-second intervals for up to five
minutes. Connection failures trigger cleanup.
* Disconnect failures are reported after successful sessions without
replacing an error already raised during the session.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Dalia Frank <dafrank@redhat.com>
@Ahmad-Hafe
Ahmad-Hafe force-pushed the cnv-96772-snapshot-restore-mixed-rhcos branch from a54c84b to d2923bf Compare October 14, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.