Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions tests/storage/cdi_clone/test_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from utilities.constants import (
OS_FLAVOR_FEDORA,
OS_FLAVOR_WINDOWS,
TIMEOUT_1MIN,
TIMEOUT_40MIN,
Images,
)
Expand Down Expand Up @@ -107,23 +106,19 @@ def test_successful_vm_restart_with_cloned_dv(
cluster_csi_drivers_names,
):
size = get_dv_size_from_datasource(data_source=fedora_data_source_scope_module)

with DataVolume(
name="dv-target",
with create_dv(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be an issue with WFFC storage.

create_dv() creates a first consumer pod, which may put a PVC on a certain node, and if this node cannot accommodate our future VM, VM will never be scheduled.
The expected WFFC flow is to create a DV, leave it without the consumer, and then VM that wants to use it becomes its first consumer.

Copy link
Copy Markdown
Contributor Author

@ema-aka-young ema-aka-young Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, thank you. I'll revert this change.

Copy link
Copy Markdown
Contributor Author

@ema-aka-young ema-aka-young Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jpeimer After some investigation, I noticed we could avoid having the dummy consumer pod setting consume_wffc to False

if sc_volume_binding_mode_is_wffc(sc=storage_class, client=client) and consume_wffc:

And we could have a conditional wait for DV success or pending population, depending on the storage class binding. Like we have in
if sc_volume_binding_mode_is_wffc(sc=storage_class_name_scope_module, client=unprivileged_client):
dv.wait_for_status(status=DataVolume.Status.PENDING_POPULATION, timeout=TIMEOUT_1MIN)
else:
dv.wait_for_dv_success(timeout=TIMEOUT_1MIN)

What do you think of this approach?

dv_name="dv-target",
namespace=namespace.name,
client=unprivileged_client,
size=size,
api_name="storage",
storage_class=storage_class_name_scope_module,
source_ref={
"kind": fedora_data_source_scope_module.kind,
"name": fedora_data_source_scope_module.name,
"namespace": fedora_data_source_scope_module.namespace,
},
) as cdv:
cdv.wait(timeout=TIMEOUT_1MIN, wait_for_exists_only=True)
cdv.pvc.wait()

cdv.wait_for_dv_success()
with create_vm_from_dv(
client=unprivileged_client,
dv=cdv,
Expand Down