Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix waitForMount method #45

Open
minbaev opened this issue Oct 4, 2022 · 1 comment
Open

Fix waitForMount method #45

minbaev opened this issue Oct 4, 2022 · 1 comment

Comments

@minbaev
Copy link
Member

minbaev commented Oct 4, 2022

driver fails producing only a known no-harm error from linux-mounter pckeage if waiting for mount is enabled

I0927 13:54:36.900413       1 mount_linux.go:202] Cannot run systemd-run, assuming non-systemd OS
I0927 13:54:36.900433       1 mount_linux.go:203] systemd-run output: System has not been booted with systemd as init system (PID 1). Can't operate1

temp fix is to comment out call to the method
https://github.com/IBM/satellite-object-storage-plugin/blob/main/pkg/mounter/mounter.go#L53

@ambiknai
Copy link
Member

Actual error when mount point doesnt exist

I1021 04:55:24.204564       1 nodeserver.go:264] Output: Output string error mountpoint: /var/data/kubelet/pods/a3c4dee5-ab87-4abf-93f7-db3802fa0ce1/volumes/kubernetes.io~csi/pvc-917efa96-ed15-475f-bbe6-48578720a70c/mount: No such file or directory
E1021 04:55:24.204597       1 nodeserver.go:126] Can not validate target mount point: /var/data/kubelet/pods/a3c4dee5-ab87-4abf-93f7-db3802fa0ce1/volumes/kubernetes.io~csi/pvc-917efa96-ed15-475f-bbe6-48578720a70c/mount exit status 1
E1021 04:55:24.204609       1 server.go:155] GRPC error: rpc error: code = Internal desc = exit status 1

Test Results

➜  csi-object oc get pods                                                                 
NAME                      READY   STATUS    RESTARTS   AGE
cos-csi-app               1/1     Running   0          6m33s
cos-s3-csi-attacher-0     1/1     Running   0          7m42s
cos-s3-csi-controller-0   2/2     Running   0          7m41s
cos-s3-csi-driver-bcl6m   2/2     Running   0          8m15s
cos-s3-csi-driver-rdqqr   2/2     Running   0          8m16s
cos-s3-csi-driver-wxldt   2/2     Running   0          94s
➜  csi-object oc exec -it cos-csi-app /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@cos-csi-app:/# mount | grep s3fs
s3fs on /data type fuse.s3fs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
root@cos-csi-app:/# ls /data
root@cos-csi-app:/# cd /data
root@cos-csi-app:/data# echo "test mount" > new.txt
root@cos-csi-app:/data# exit
exit
➜  csi-object oc get pods
oc delete pods NAME                      READY   STATUS    RESTARTS   AGE
cos-csi-app               1/1     Running   0          10m
cos-s3-csi-attacher-0     1/1     Running   0          11m
cos-s3-csi-controller-0   2/2     Running   0          11m
cos-s3-csi-driver-bcl6m   2/2     Running   0          11m
cos-s3-csi-driver-rdqqr   2/2     Running   0          11m
cos-s3-csi-driver-wxldt   2/2     Running   0          5m11s
➜  csi-object oc delete pods cos-csi-app
pod "cos-csi-app" deleted
➜  csi-object oc get pods               
NAME                      READY   STATUS    RESTARTS   AGE
cos-s3-csi-attacher-0     1/1     Running   0          14m
cos-s3-csi-controller-0   2/2     Running   0          14m
cos-s3-csi-driver-bcl6m   2/2     Running   0          14m
cos-s3-csi-driver-rdqqr   2/2     Running   0          14m
cos-s3-csi-driver-wxldt   2/2     Running   0          8m17s
➜  csi-object oc create -f cos-csi-app.yaml                                               
Warning: would violate PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "app-frontend" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "app-frontend" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "app-frontend" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "app-frontend" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
pod/cos-csi-app created
➜  csi-object oc get pods                   
NAME                      READY   STATUS    RESTARTS   AGE
cos-csi-app               1/1     Running   0          17s
cos-s3-csi-attacher-0     1/1     Running   0          14m
cos-s3-csi-controller-0   2/2     Running   0          14m
cos-s3-csi-driver-bcl6m   2/2     Running   0          15m
cos-s3-csi-driver-rdqqr   2/2     Running   0          15m
cos-s3-csi-driver-wxldt   2/2     Running   0          8m48s
➜  csi-object oc exec -it cos-csi-app /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@cos-csi-app:/# ls /data
new.txt
root@cos-csi-app:/# exit
exit
➜  csi-object oc logs cos-s3-csi-driver-wxldt -c cos-s3-csi-driver > cos-s3-csi-driver.log
➜  csi-object cat cos-s3-csi-driver.log | grep "System has not been"
➜  csi-object 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants