Change:
Seen in pull-kubernetes-e2e-gce-cos-alpha-features Specific job failure
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
from the error message I don't know if it refers to the sig-storage error or to the sig-auth one
/sig storage
/kind failing-test
/assign From : ... I am not sure if it's related:
is the culprit. cannot be used inside a . This only gets caught when the test actually runs, otherwise Ginkgo never sees the incorrect .
I don’t understand why sometimes it can get the pv by namebut sometimes it failed
but then is a sig-auth test , not storage , sorry /sig auth this seems that was recently in
/remove sig-storage
/assign /priority important-soon
/unassign
is still failed. seems not fixing the whole problem. /reopen feel free to close if the ci is green.
Reopened this issue. <detailsIn response to : is still failed. /reopen feel free to close if the ci is green. 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 failure now looks like it is just a sig storage issue:
cc
/assign looks like the new test is still an issue
I think this line is the problem: When the test creates the object, it may take time for the PV to be provisioned and to be bound to the PVC. So you should do another before this call so you can get the latest PVC object with the bound PV.
I opened to get PVC again before using .
Only do PersistentVolumeClaims.Get() is not enough, whether we need to wait for sometimes to wait it bound? because sometimes the testcase is successful and sometime is failed.
If the Pod was able to run, then the PVC has to be bound.
so I can't understand why sometimes the testcase is successful and sometimes is failed.
By default, the DelayBinding is false, it will wait for PVC bound during creation. This is weird.
It waits for the claim to be bound, but the test case still needs to refresh its pvc object.
Because of the refresh is async, so after the pvc was bound, we need to get the pvc again, isn't it?

Discussion:
// if the secret is not nil, compare it if expectedCall.expectedSecret != nil { <del> if !reflect.DeepEqual(expectedCall.expectedSecret, c.Request.Secret) { return allCalls, i, fmt.Errorf("Unexpected secret: expected %v, got %v", expectedCall.expectedSecret, c.Request.Secret) </del> <ins> if !reflect.DeepEqual(expectedCall.expectedSecret, c.Request.Secrets) { return allCalls, i, fmt.Errorf("Unexpected secret: expected %v, got %v", expectedCall.expectedSecret, c.Request.Secrets) </ins> } }

}) } }) <del> ginkgo.Context("CSI online volume expansion with secret[Feature:CSINodeExpandSecret]", func() { </del> <ins> ginkgo.Context("CSI online volume expansion with secret", func() { </ins> var stringSecret = map[string]string{ "username": "admin", "password": "t0p-Secret",

err = e2epod.WaitForPodNameRunningInNamespace(ctx, m.cs, pod.Name, pod.Namespace) framework.ExpectNoError(err, "Failed to start pod1: %v", err) <ins> pvc, err = m.cs.CoreV1().PersistentVolumeClaims(pvc.Namespace).Get(ctx, pvc.Name, metav1.GetOptions{}) if err != nil { framework.Failf("failed to get pvc %s, %v", pvc.Name, err) } gomega.Expect(pvc.Spec.VolumeName).ShouldNot(gomega.BeEquivalentTo(""), "while provisioning a volume for resizing") </ins> pv, err := m.cs.CoreV1().PersistentVolumes().Get(ctx, pvc.Spec.VolumeName, metav1.GetOptions{}) if err != nil { framework.Failf("failed to get pv %s, %v", pvc.Spec.VolumeName, err)

if pv.Spec.CSI == nil || pv.Spec.CSI.NodeExpandSecretRef == nil { framework.Fail("creating pv without 'NodeExpandSecretRef'") } <ins> if pv.Spec.CSI.NodeExpandSecretRef.Namespace != f.Namespace.Name || pv.Spec.CSI.NodeExpandSecretRef.Name != secretName { framework.Failf("failed to set node expand secret ref, namespace: %s name: %s", pv.Spec.CSI.NodeExpandSecretRef.Namespace, pv.Spec.CSI.NodeExpandSecretRef.Name) } </ins> ginkgo.By("Expanding current pvc") newSize := resource.MustParse("6Gi")

err = testsuites.WaitForControllerVolumeResize(ctx, pvc, m.cs, csiResizeWaitPeriod) framework.ExpectNoError(err, "While waiting for PV resize to finish") <ins> ginkgo.By("Waiting for PVC resize to finish") pvc, err = testsuites.WaitForFSResize(ctx, pvc, m.cs) framework.ExpectNoError(err, "while waiting for PVC to finish") </ins> ginkgo.By("Waiting for all remaining expected CSI calls") err = wait.Poll(time.Second, csiResizeWaitPeriod, func() (done bool, err error) { <del> _, index, err := compareCSICalls(ctx, trackedCalls, test.expectedCalls, m.driver.GetCalls) </del> <ins> var index int _, index, err = compareCSICalls(ctx, trackedCalls, test.expectedCalls, m.driver.GetCalls) </ins> if err != nil { return true, err }

}) framework.ExpectNoError(err, "while waiting for all CSI calls") <del> ginkgo.By("Waiting for PVC resize to finish") pvc, err = testsuites.WaitForFSResize(ctx, pvc, m.cs) framework.ExpectNoError(err, "while waiting for PVC to finish") </del> pvcConditions := pvc.Status.Conditions framework.ExpectEqual(len(pvcConditions), 0, "pvc should not have conditions") })

Method  string Request struct { VolumeContext map[string]string `json:"volume_context"` <del> Secret        map[string]string `json:"secret"` </del> <ins> Secrets       map[string]string `json:"secrets"` </ins> } FullError struct { Code    codes.Code `json:"code"`

- name: socket-dir mountPath: /csi - name: csi-provisioner <del> image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0 </del> <ins> image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 </ins> args: - "--v=5" - "--csi-address=/csi/csi.sock"

name: socket-dir - name: csi-provisioner <del> image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0 </del> <ins> image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 </ins> args: - -v=5 - --csi-address=/csi/csi.sock

serviceAccountName: csi-mock containers: - name: csi-provisioner <del> image: registry.k8s.io/sig-storage/csi-provisioner:v3.3.0 </del> <ins> image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.0 </ins> args: - "--csi-address=$(ADDRESS)" # Topology support is needed for the pod rescheduling test