Skip to content

Commit e0faf2d

Browse files
committed
test: select node for late binding tests
The generic ephemeral volume test runs with a variant that uses late binding and that failed when the selected node didn't have the driver: E0301 08:28:16.192962 1 controller.go:984] error syncing claim "17c6176b-3ea7-4363-bc35-eb25c2c20f4e": failed to provision volume with StorageClass "ephemeral-9299-e2e-scmtzhx": error generating accessibility requirements: no topology key found on CSINode csi-prow-worker2 The in-tree hostpath driver deployment avoids that by setting the node on which test pods may run: https://github.com/kubernetes/kubernetes/blob/793390e13be91d79150b57abad5710477ab96bd7/test/e2e/storage/drivers/csi.go#L193 We need to do the same when testing the driver externally.
1 parent 42479e9 commit e0faf2d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

deploy/util/deploy-hostpath.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,4 +245,11 @@ fi
245245
# expects it?
246246
if [ "${CSI_PROW_TEST_DRIVER}" ]; then
247247
cp "${BASE_DIR}/test-driver.yaml" "${CSI_PROW_TEST_DRIVER}"
248+
249+
# When testing late binding, pods must be forced to run on the
250+
# same node as the hostpath driver. external-provisioner currently
251+
# doesn't handle the case when the "wrong" node is chosen and gets
252+
# stuck permanently with:
253+
# error generating accessibility requirements: no topology key found on CSINode csi-prow-worker2
254+
echo >>"${CSI_PROW_TEST_DRIVER}" "ClientNodeName: $(kubectl get pods/csi-hostpath-provisioner-0 -o jsonpath='{.spec.nodeName}')"
248255
fi

0 commit comments

Comments
 (0)