[sanity-test] No volume_context parameter in ControllerPublishVolumeRequest

257 views
Skip to first unread message

Johnson Cheng

unread,
Jan 11, 2023, 5:32:50 AM1/11/23
to kubernetes-sig-storage
Hi All,

In SP I have reported volume_context in CreateVolumeResponse(), but it dones't pass through to ControllerPublishVolumeRequest().
It will cause 4 failed items as below when I do sanity test ,
  * Controller Service [Controller Server] ControllerPublishVolume [It] should fail when the node does not exist
  * Controller Service [Controller Server] ControllerPublishVolume [It] should fail when the volume is already published but is incompatible
  * Controller Service [Controller Server] volume lifecycle [It] should work
  * Controller Service [Controller Server] volume lifecycle [It] should be idempotent

Here is my patch file,
--- csi-test-5.0.0/pkg/sanity/controller.go    2022-08-03 13:51:53.000000000 -0400
+++ csi-test-5.0.0-m/pkg/sanity/controller.go    2023-01-09 03:57:47.218483827 -0500
@@ -988,6 +988,7 @@
                     VolumeCapability: TestVolumeCapabilityWithAccessType(sc, csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER),
                     Readonly:         false,
                     Secrets:          sc.Secrets.ControllerPublishVolumeSecret,
+                    VolumeContext:    vol.GetVolume().GetVolumeContext(),
                 },
             )
             Expect(err).To(HaveOccurred())
@@ -1036,6 +1037,7 @@
                 VolumeCapability: TestVolumeCapabilityWithAccessType(sc, csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER),
                 Readonly:         false,
                 Secrets:          sc.Secrets.ControllerPublishVolumeSecret,
+                VolumeContext:    vol.GetVolume().GetVolumeContext(),
             }
 
             conpubvol := r.MustControllerPublishVolume(context.Background(), pubReq)
@@ -1719,6 +1721,7 @@
                 VolumeCapability: TestVolumeCapabilityWithAccessType(sc, csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER),
                 Readonly:         false,
                 Secrets:          sc.Secrets.ControllerPublishVolumeSecret,
+                VolumeContext:    vol.GetVolume().GetVolumeContext(),
             },

Hope it's useful for you.

Best Regards,
Johnson
Reply all
Reply to author
Forward
0 new messages