csi-s3 icon indicating copy to clipboard operation
csi-s3 copied to clipboard

error when create pvc.

Open chenyg0911 opened this issue 3 years ago • 5 comments

apply examples/pvc.yaml, describe pvc:

  Normal   Provisioning          105s (x11 over 15m)  ch.ctrox.csi.s3-driver_csi-provisioner-s3-0_11352194-f196-4f57-af40-e1fdd0e57ee3  External provisioner is provisioning volume for claim "default/csi-s3-pvc"
  Warning  ProvisioningFailed    105s (x11 over 15m)  ch.ctrox.csi.s3-driver_csi-provisioner-s3-0_11352194-f196-4f57-af40-e1fdd0e57ee3  failed to provision volume with StorageClass "csi-s3": rpc error: code = Unknown desc = failed to check if bucket ui-root-2/pvc-6131922c-2466-4bd2-a3b9-a0bd1433eaf1 exists: 400 Bad Request
  Normal   ExternalProvisioning  9s (x62 over 15m)    persistentvolume-controller                                                       waiting for a volume to be created, either by external provisioner "ch.ctrox.csi.s3-driver" or manually created by system administrator

provisioner log:

I0421 09:02:26.482248       1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"csi-s3-pvc", UID:"6131922c-2466-4bd2-a3b9-a0bd1433eaf1", APIVersion:"v1", ResourceVersion:"261004", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "default/csi-s3-pvc"
I0421 09:02:26.670216       1 controller.go:1102] Final error received, removing PVC 6131922c-2466-4bd2-a3b9-a0bd1433eaf1 from claims in progress
W0421 09:02:26.670285       1 controller.go:961] Retrying syncing claim "6131922c-2466-4bd2-a3b9-a0bd1433eaf1", failure 10
E0421 09:02:26.670340       1 controller.go:984] error syncing claim "6131922c-2466-4bd2-a3b9-a0bd1433eaf1": failed to provision volume with StorageClass "csi-s3": rpc error: code = Unknown desc = failed to check if bucket ui-root-2/pvc-6131922c-2466-4bd2-a3b9-a0bd1433eaf1 exists: 400 Bad Request
I0421 09:02:26.670874       1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"csi-s3-pvc", UID:"6131922c-2466-4bd2-a3b9-a0bd1433eaf1", APIVersion:"v1", ResourceVersion:"261004", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "csi-s3": rpc error: code = Unknown desc = failed to check if bucket ui-root-2/pvc-6131922c-2466-4bd2-a3b9-a0bd1433eaf1 exists: 400 Bad Request
I0421 09:04:18.773154       1 reflector.go:381] k8s.io/client-go/informers/factory.go:134: forcing resync

Git clone the code master branch. Kubernetes v1.19.7

chenyg0911 avatar Apr 21 '21 09:04 chenyg0911

What object storage provider are you using? Since the bucket exists call is basically the first the driver will make to the s3 API, I assume something with the config is wrong there.

ctrox avatar Apr 29 '21 18:04 ctrox

What object storage provider are you using? Since the bucket exists call is basically the first the driver will make to the s3 API, I assume something with the config is wrong there.

I'm using AWS S3 in china, I can access it normally with aws-cli and minio client. secret.yaml:

apiVersion: v1
kind: Secret
metadata:
  namespace: kube-system
  name: csi-s3-secret
stringData:
  accessKeyID: myID
  secretAccessKey: MyKey
  # For AWS set it to "https://s3.<region>.amazonaws.com"
  endpoint: https://s3.cn-northwest-1.amazonaws.com.cn
  # If not on S3, set it to ""
  region: cn-northwest-1

chenyg0911 avatar Apr 30 '21 03:04 chenyg0911

@chenyg0911 Commenting out region entirely from the secret allowed the volume to be provisioned successfully on AWS.

nuwang avatar Jul 18 '21 15:07 nuwang

@nuwang change secret setting as: ...
region: "cn-northwest-1"

still got error:

I0727 02:11:42.576412       1 utils.go:97] GRPC call: /csi.v1.Controller/CreateVolume
I0727 02:11:42.576719       1 controllerserver.go:74] Got a request to create volume ui-root-2/pvc-b27521ef-91fd-4fba-9fcf-aaba3307f637
E0727 02:11:42.803684       1 utils.go:101] GRPC error: failed to check if bucket ui-root-2/pvc-b27521ef-91fd-4fba-9fcf-aaba3307f637 exists: 400 Bad Request

chenyg0911 avatar Jul 27 '21 02:07 chenyg0911

Removing the Region worked for me too

aneurinprice avatar May 03 '22 19:05 aneurinprice