Open Ruakij opened 1 year ago
What I have found yet:
path
was introduced in https://github.com/seaweedfs/seaweedfs-csi-driver/commit/5c2298bd215959d78c881e5d48d96569b83ab3c7, it replaced older bucketName
bucketName
I seems to me that path
should be also handled in controllerserver, not just in nodeserver (via mounter).
@kvaster, are you using path
? In what case it is working for you?
There are at least two ways of using seaweedfs:
I will recheck logic and will get back.
Problem
By default, the driver will use the
volumeId
to create a new folder under/buckets/<volumeId>
. This also gets deleted when the volume is deleted.But as we can override the path given to the filer by setting
spec.csi.volumeAttributes.path
, this doesnt work then.Behavior
Expected Behaviour
Steps to recreate
/mytest
is created Interestingly, also the path/buckets/test
doesnt exist.CreateVolume:
https://github.com/seaweedfs/seaweedfs-csi-driver/blob/d777b8750bb2dd33948988f4eec8813e6207a0cd/pkg/driver/controllerserver.go#L53 DeleteVolume:
https://github.com/seaweedfs/seaweedfs-csi-driver/blob/d777b8750bb2dd33948988f4eec8813e6207a0cd/pkg/driver/controllerserver.go#L83 ValidateVolumeCapabilities:
https://github.com/seaweedfs/seaweedfs-csi-driver/blob/d777b8750bb2dd33948988f4eec8813e6207a0cd/pkg/driver/controllerserver.go#L127
Depending on what we want to allow, we could ideally get the path of the volume and operate on that. This would then be equivalent to volumes which dont have a path set.
Though i am not sure how hard it is to get that information as its not passed with the Request.
From what i observed, the CreateVolume isnt even called when a PV is created, only when it happens through a PVC?
Maybe this is an expected behaviour?