I'm wondering if a race condition is causing this. I've seen it a few times and I suspect what's happening is the file mode call is somehow creating a directory in the same path as the child dataset before the dataset is exported. Not sure the best way to resolve it but maybe can mitigate it with a crude sleep function before the chmod api call triggers.
Error creating NFS share for {Id:0 Alldirs:true Comment:freenas-provisioner (freenas-nfs-provisioner): tank/k8s/primary/r-39-trax-5212-equipment-to-recipient-bug-fix/standard Hosts: MapallUser: MapallGroup: MaprootUser:root MaprootGroup:wheel Network: Paths:[/mnt/tank/k8s/primary/r-39-trax-5212-equipment-to-recipient-bug-fix/standard] Security:[] Quiet:false ReadOnly:false} - {"nfs_alldirs":["This option can only be used for datasets."]}
I'm wondering if a race condition is causing this. I've seen it a few times and I suspect what's happening is the file mode call is somehow creating a directory in the same path as the child dataset before the dataset is exported. Not sure the best way to resolve it but maybe can mitigate it with a crude sleep function before the chmod api call triggers.