Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton for test restage volume if NodeStageVolume not called #1806

Merged
Merged
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
22 changes: 22 additions & 0 deletions manager/integration/tests/test_csi.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,3 +931,25 @@ def test_csi_minimal_volume_size(
write_pod_volume_data(core_api, pod_name, test_data, test_file)
read_data = read_volume_data(core_api, pod_name, test_file)
assert read_data == test_data


@pytest.mark.csi
@pytest.mark.skip(reason="TODO")
def test_restage_volume_if_node_stage_volume_not_called():
"""
Test restage volume if NodeStageVolume not called (CSI)

1. Create a PVC with spec.volumeMode == Block.
2. Create a Deployment with spec.replicas == 1 that uses the PVC. Set a
spec.selector on the Deployment so it can only run Pods on one node.
3. Hard reboot the node running the Deployment's single Pod.
4. Before the node comes back, force delete the "running" Pod.
5. Before the node comes back, verify there is now one pending Pod and one
terminating Pod.
6. After the node comes back, verify that a Pod becomes running and remains
running. It is fine if that Pod is different not the pending one from
above. The automatic remount mechanism may cause some churn.
7. Force delete the running Pod again.
8. Verify that a Pod becomes running and remains running.
"""
pass