Change:
<!-- Feature requests are unlikely to make progress as an issue. Instead, please suggest enhancements by engaging with SIGs on slack and mailing lists. A proposal that works through the design along with the implications of the change can be opened as a KEP: --In block volume tests were skipped because is not using , there are more details about how these functions are used in This is a test that uses the , if tested using the it should have , in addition the test cluster should have the Things that are needed for a first time contributor a development kubernetes cluster, preferably on a public cloud instance although I'm not sure if kind can be used a CSI driver like PD CSI Driver, the storage class should be setup to use the xfs fstype the volume snapshot CRDs and controllers installed in the cluster (kubernetes-csi/external-snapshotter#usage) /sig storage /area testing /good-first-issue
This request has been marked as suitable for new contributors. Please ensure the request meets the requirements listed . If this request no longer meets these requirements, the label can be removed by commenting with the command. <detailsIn response to : <!-- Feature requests are unlikely to make progress as an issue. --/area testing /good-first-issue Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
The label(s) cannot be applied, because the repository doesn't have them. <detailsIn response to : #### What would you like to be : /area testing /good-first-issue Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
Hey team! I'd like to further investigate on this issue if possible?
/assign
/area test hey sure, I've more info about how to test it, it requires these components: a development kubernetes cluster, preferably on a public cloud instance although I'm not sure if can be used a CSI driver like , the storage class should be setup to use the fstype the volume snapshot CRDs and controllers installed in the cluster ()
thanks a lot !! I might be a bit slow though, I'm pretty new to the community. I appreciate the documentation you shared, the assignation and how to replicate it, I'll test it out and if I have some doubts, I'll get back with you :D
Hey are you still working on this issue? I am interested in this
Yes, I'm still working on this, but would totally be open to doing pair-programming if you're open to it? I would benefit from you for solving the problem since I'm still pretty new to the codebase and I'm still understanding the environment.
Hey Are you still working on this, I would like to do pair-programming if possible.
Hi there definitely!! Ping me out in slack in the Kubernetes workspace with "Diego Goytia"

Discussion:
if test.Mode == v1.PersistentVolumeBlock { // Block: check content deviceName := fmt.Sprintf("/opt/%d", i) <del> commands := generateReadBlockCmd(deviceName, len(test.ExpectedContent)) </del> <ins> commands := GenerateReadBlockCmd(deviceName, len(test.ExpectedContent)) </ins> _, err := framework.LookForStringInPodExec(pod.Namespace, pod.Name, commands, test.ExpectedContent, time.Minute) framework.ExpectNoError(err, "failed: finding the contents of the block device %s.", deviceName)

} // generateReadBlockCmd generates the corresponding command lines to read from a block device with the given file path. <del> func generateReadBlockCmd(fullPath string, numberOfCharacters int) []string { </del> <ins> func GenerateReadBlockCmd(fullPath string, numberOfCharacters int) []string { </ins> var commands []string commands = []string{"head", "-c", strconv.Itoa(numberOfCharacters), fullPath} return commands

if pattern.SnapshotType == "" { e2eskipper.Skipf("Driver %q does not support snapshots - skipping", dInfo.Name) } <del> if pattern.VolMode == v1.PersistentVolumeBlock { // TODO: refactor prepareSnapshotDataSourceForProvisioning() below to use // utils.CheckWriteToPath / utils.CheckReadFromPath and remove // redundant InjectContent(). This will enable block volume tests. e2eskipper.Skipf("This test does not support block volumes -- skipping") } </del> // Create a volume testVolumeSizeRange := t.GetTestSuiteInfo().SupportedSizeRange

if !l.driver.GetDriverInfo().Capabilities[storageframework.CapPVCDataSource] { e2eskipper.Skipf("Driver %q does not support volume clone - skipping", dInfo.Name) } <del> if pattern.VolMode == v1.PersistentVolumeBlock { // TODO: refactor preparePVCDataSourceForProvisioning() below to use // utils.CheckWriteToPath / utils.CheckReadFromPath and remove // redundant InjectContent(). This will enable block volume tests. e2eskipper.Skipf("This test does not support block volumes -- skipping") } </del> // Create a volume expectedContent := fmt.Sprintf("volume content %d", time.Now().UTC().UnixNano())

e2epod.SetAffinity(&node, actualNodeName) } <del> // Check that all pods the same content for i, pod := range pods { fileName := "/mnt/volume1/index.html" index := i + 1 ginkgo.By(fmt.Sprintf("Checking if the volume in pod%d has expected initial content", index)) commands := e2evolume.GenerateReadFileCmd(fileName) _, err := framework.LookForStringInPodExec(pod.Namespace, pod.Name, commands, expectedContent, time.Minute) framework.ExpectNoError(err, "failed: finding the contents of the mounted file %s.", fileName) </del> <ins> for i, pvc := range pvcs { var commands []string if *pvc.Spec.VolumeMode == v1.PersistentVolumeBlock { fileName := "/mnt/volume1" commands = e2evolume.GenerateReadBlockCmd(fileName, len(expectedContent)) // Check that all pods have the same content index := i + 1 ginkgo.By(fmt.Sprintf("Checking if the volume in pod%d has expected initial content", index)) _, err := framework.LookForStringInPodExec(pods[i].Namespace, pods[i].Name, commands, expectedContent, time.Minute) framework.ExpectNoError(err, "failed: finding the contents of the block volume %s.", fileName) } else { fileName := "/mnt/volume1/index.html" commands = e2evolume.GenerateReadFileCmd(fileName) // Check that all pods have the same content index := i + 1 ginkgo.By(fmt.Sprintf("Checking if the volume in pod%d has expected initial content", index)) _, err := framework.LookForStringInPodExec(pods[i].Namespace, pods[i].Name, commands, expectedContent, time.Minute) framework.ExpectNoError(err, "failed: finding the contents of the mounted file %s.", fileName) } </ins> } }