-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
Hello,
I'm using democratic-csi with TrueNAS Core 25.04.0 to provision NFS volumes via the freenas-nfs driver.
However, the driver still attempts to create the NFS share, and the TrueNAS Core API responds with a 422 error because of invalid fields (paths, alldirs, quiet).33
Logs :
{
"host": "zfs-nfs-democratic-csi-controller-846c8c8987-25xn7",
"level": "error",
"message": "handler error - driver: FreeNASSshDriver method: CreateVolume error: {
\"name\": \"GrpcError\",
\"code\": 2,
\"message\": \"received error creating nfs share - code: 422 body: {
\\\"data.path\\\": [
{\\\"message\\\": \\\"Field required\\\", \\\"errno\\\": 22}
],
\\\"data.paths\\\": [
{\\\"message\\\": \\\"Extra inputs are not permitted\\\", \\\"errno\\\": 22}
],
\\\"data.alldirs\\\": [
{\\\"message\\\": \\\"Extra inputs are not permitted\\\", \\\"errno\\\": 22}
],
\\\"data.quiet\\\": [
{\\\"message\\\": \\\"Extra inputs are not permitted\\\", \\\"errno\\\": 22}
]
}\"
}",
"service": "democratic-csi",
"timestamp": "2025-04-27T08:25:33.846Z"
}
Values :
csiDriver:
# should be globally unique for a given cluster
name: "org.democratic-csi.nfs"
fsGroupPolicy: File
# add note here about volume expansion requirements
storageClasses:
- name: freenas-nfs-csi
defaultClass: false
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true
parameters:
# for block-based storage can be ext3, ext4, xfs
# for nfs should be nfs
fsType: nfs
# if true, volumes created from other snapshots will be
# zfs send/received instead of zfs cloned
# detachedVolumesFromSnapshots: "false"
# if true, volumes created from other volumes will be
# zfs send/received instead of zfs cloned
# detachedVolumesFromVolumes: "false"
mountOptions:
- noatime
- nfsvers=4
secrets:
provisioner-secret:
controller-publish-secret:
node-stage-secret:
node-publish-secret:
controller-expand-secret:
# if your cluster supports snapshots you may enable below
volumeSnapshotClasses: []
#- name: freenas-nfs-csi
# parameters:
# # if true, snapshots will be created with zfs send/receive
# # detachedSnapshots: "false"
# secrets:
# snapshotter-secret:
driver:
config:
# please see the most up-to-date example of the corresponding config here:
# https://github.com/democratic-csi/democratic-csi/tree/master/examples
# YOU MUST COPY THE DATA HERE INLINE!
driver: freenas-nfs
instance_id:
httpConnection:
protocol: https
host: 10.0.101.24
port: 443
# use only 1 of apiKey or username/password
# if both are present, apiKey is preferred
# apiKey is only available starting in TrueNAS-12
apiKey: xx
username: csi
allowInsecure: true
# use apiVersion 2 for TrueNAS-12 and up (will work on 11.x in some scenarios as well)
# leave unset for auto-detection
#apiVersion: 2
sshConnection:
host: 10.0.101.24
port: 22
username: csi
# use either password or key
privateKey: |
-----BEGIN OPENSSH PRIVATE KEY-----
-----END OPENSSH PRIVATE KEY-----
zfs:
cli:
sudoEnabled: true
paths:
zfs: /usr/sbin/zfs
zpool: /usr/sbin/zpool
sudo: /usr/bin/sudo
chroot: /usr/sbin/chroot
# can be used to set arbitrary values on the dataset/zvol
# can use handlebars templates with the parameters from the storage class/CO
#datasetProperties:
# "org.freenas:description": "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}/{{ parameters.[csi.storage.k8s.io/pvc/name] }}"
# "org.freenas:test": "{{ parameters.foo }}"
# "org.freenas:test2": "some value"
datasetParentName: k8s/vols
# do NOT make datasetParentName and detachedSnapshotsDatasetParentName overlap
# they may be siblings, but neither should be nested in the other
# do NOT comment this option out even if you don't plan to use snapshots, just leave it with dummy value
detachedSnapshotsDatasetParentName: k8s/snaps
datasetEnableQuotas: true
datasetEnableReservation: false
datasetPermissionsMode: "0777"
datasetPermissionsUser: 0
datasetPermissionsGroup: 0
#datasetPermissionsAcls:
#- "-m everyone@:full_set:allow"
#- "-m u:kube:full_set:allow"
nfs:
#shareCommentTemplate: "{{ parameters.[csi.storage.k8s.io/pvc/namespace] }}-{{ parameters.[csi.storage.k8s.io/pvc/name] }}"
shareHost: 10.0.101.24
shareAlldirs: false
shareAllowedHosts: []
shareAllowedNetworks: []
shareMaprootUser: root
shareMaprootGroup: wheel
shareMapallUser: ""
shareMapallGroup: ""
#...
Could you please help me investigate and resolve this issue?
Thank you very much for your support! 🙏
SimonRTC and cowgod
Metadata
Metadata
Assignees
Labels
No labels