Change:
Right now, we have e2e test for that executes only CSI mock driver with artificial limit of 2 volumes per node. We need a test with real CSI driver(s). Proposal: Allow individual test storage drivers to specify if they support CSI limits. Add a test that picks a random node and creates as many pods with a PV that the volume can handle (128 on GCE!). Check that the node can't handle any other volume. Make this test part of . Add similar test(s) for in-tree volume plugins. Make sure the tests work with in-tree volume plugins migrated to CSI.
/sig storage
/assign
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
This sounds important /remove-lifecycle rotten /lifecycle frozen
/priority backlog
To add to this I believe we should test that an in-tree plugin and its "replacement" CSI Driver share the same attach limits (both max and current usage)
/cc
I see this test has been here: But I want to add a more basic/faster version of the test that simply checks if a driver has then has been set in CSINode, similar to wdyt, would it be useful?
This is a really old issue :-D. I think the required test has been implemented, however, we do not run it in CI, because it takes too much time to provision 128 PDs that a GCP node can handle. /unassign That sounds useful!
/assign opened to close this for good :)

Discussion:
var ( downwardAPIHugePages featuregate.Feature = "DownwardAPIHugePages" execProbeTimeout     featuregate.Feature = "ExecProbeTimeout" <ins> csiMigration         featuregate.Feature = "CSIMigration" </ins> ) func skipInternalf(caller int, format string, args ...interface{}) {

} } <ins> func SkipIfCSIMigrationEnabled() { if utilfeature.DefaultFeatureGate.Enabled(csiMigration) { skipInternalf(1, "Only supported when %v feature is disabled", csiMigration) } } </ins> // SkipIfMissingResource skips if the gvr resource is missing. func SkipIfMissingResource(dynamicClient dynamic.Interface, gvr schema.GroupVersionResource, namespace string) { resourceClient := dynamicClient.Resource(gvr).Namespace(namespace)

}) framework.ExpectNoError(err) }) <ins> ginkgo.It("should verify that all csinodes have volume limits", func() { driverInfo := driver.GetDriverInfo() if !driverInfo.Capabilities[storageframework.CapVolumeLimits] { ginkgo.Skip(fmt.Sprintf("driver %s does not support volume limits", driverInfo.Name)) } l.ns = f.Namespace l.cs = f.ClientSet l.config, l.testCleanup = driver.PrepareTest(f) defer l.testCleanup() nodeNames := []string{} if l.config.ClientNodeSelection.Name != "" { // Some CSI drivers are deployed to a single node (e.g csi-hostpath), // so we check that node instead of checking all of them nodeNames = append(nodeNames, l.config.ClientNodeSelection.Name) } else { nodeList, err := e2enode.GetReadySchedulableNodes(f.ClientSet) framework.ExpectNoError(err) for _, node := range nodeList.Items { nodeNames = append(nodeNames, node.Name) } } for _, nodeName := range nodeNames { ginkgo.By("Checking csinode limits") _, err := getNodeLimits(l.cs, l.config, nodeName, driverInfo) if err != nil { framework.Failf("Expected volume limits to be set, error: %v", err) } } }) </ins> } func cleanupTest(cs clientset.Interface, ns string, runningPodName, unschedulablePodName string, pvcs []*v1.PersistentVolumeClaim, pvNames sets.String, timeout time.Duration) error {

f := framework.NewDefaultFramework("volume-limits-on-node") ginkgo.BeforeEach(func() { e2eskipper.SkipUnlessProviderIs("aws", "gce", "gke") <ins> // If CSIMigration is enabled, then the limits should be on CSINodes, not Nodes, and another test checks this e2eskipper.SkipIfCSIMigrationEnabled() </ins> c = f.ClientSet framework.ExpectNoError(framework.WaitForAllNodesSchedulable(c, framework.TestContext.NodeSchedulableTimeout)) })