sigma / cifs_k8s_plugin

Kubernetes cifs volume plugin
Apache License 2.0
24 stars 13 forks source link

Error messages from plugin on K8s 1.6.2 #4

Open paalkr opened 7 years ago

paalkr commented 7 years ago

Hi

I tried to use your plugin on K8s 1.6.2, but I do get some error messages.

May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]: E0520 22:11:47.491841    2246 driver-call.go:212] Failed to unmarshal output for command: getvolumename, output: Invalid usage. Usage:
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs init
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs attach <json params>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs detach <mount device>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs mount <mount dir> <mount device> <json params>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs unmount <mount dir>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]: , error: invalid character 'I' looking for beginning of value
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]: W0520 22:11:47.491874    2246 driver-call.go:140] FlexVolume: driver call failed: executable: /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs, args: [getvolumename {"kubernetes.io/fsType":"","kubernetes.io/readwrite":"ro","mountOptions":"dir_mode=0700,file_mode=0600","source":"//zsmb.gdo.aws/mapcache"}], error: exit status 1, output: Invalid usage. Usage:
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs init
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs attach <json params>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs detach <mount device>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs mount <mount dir> <mount device> <json params>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]:         /etc/kubernetes/volumeplugins/hodique.info~cifs/cifs unmount <mount dir>
May 20 22:11:47 ip-10-1-45-42.eu-west-1.compute.internal kubelet-wrapper[2246]: E0520 22:11:47.491909    2246 desired_state_of_world_populator.go:272] Failed to add volume "mapcache" (specName: "mapcache") for pod "50df9190-3da9-11e7-9ea1-06b991cd96f6" to desiredStateOfWorld. err=failed to GetUniqueVolumeNameFromSpec for volumeSpec "mapcache" using volume plugin "hodique.info/cifs" err=failed to GetVolumeName from volumePlugin for volumeSpec "mapcache" err=invalid character 'I' looking for beginning of value

This is my volume config in the deployment.yaml file

      volumes:
      - name: efs-sharedarcgis
        nfs:
          server: fs-xxxxxxxxxxx.amazonaws.com
          path: /sharedarcgis
      - name: mapcache
        flexVolume:
          driver: "hodique.info/cifs"
          secretRef:
            name: zsmbarcgiscreds
          readOnly: true
          options:
            source: "//zsmb.gdo.aws/mapcache"
            mountOptions: "dir_mode=0700,file_mode=0600"          
      - name: podinfo
        downwardAPI:
          items:
          - path: labels
            fieldRef:
              fieldPath: metadata.labels

Any suggestions?

paalkr commented 7 years ago

Giving some more info to my own bug report. Seems like there are some more required commands that needs to be implemented.

https://github.com/kubernetes/community/blob/master/contributors/devel/flexvolume.md