nfs: implement ControllerModifyVolume to change NFS-server hostname
The new hostname of the NFS-server is stored in a journal entry for the volume. The new NFS-server will only be used the next time the NFS Volume is mounted on a worker node.
It is not possible to update the VolumeContext of a Volume, so the old hostname of the NFS=server will be stored there forever.
Show available bot commands
These commands are normally not required, but in case of issues, leave any of the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>: retest the<job-name>after unrelated failure (please report the failure too!)
@nixpanic is this tested code? i dont see ControllerServiceCapability_RPC_MODIFY_VOLUME capability is exposed for nFS
Still trying to add some e2e tests, the csi-provisioner and csi-resizer sidecars have just gained the ability to pass credentials to the ControllerModifyVolume request.
/test ci/centos/mini-e2e-helm/k8s-1.34/nfs
/test ci/centos/mini-e2e/k8s-1.34/nfs
/test ci/centos/mini-e2e/k8s-1.34
@nixpanic is this tested code? i dont see ControllerServiceCapability_RPC_MODIFY_VOLUME capability is exposed for nFS
Verified :stuck_out_tongue_winking_eye: that it fails with this:
I1212 12:26:38.595866 75590 pvc.go:85] PVC cephcsi-nfs-pvc Event: ProvisioningFailed - CSI driver does not support VolumeAttributesClass: controller MODIFY_VOLUME capability is not reported
/test ci/centos/mini-e2e/k8s-1.34
/test ci/centos/mini-e2e/k8s-1.34
/test ci/centos/mini-e2e/k8s-1.34
/test ci/centos/mini-e2e/k8s-1.34/cephfs
/test ci/centos/mini-e2e/k8s-1.34/cephfs
/test ci/centos/mini-e2e/k8s-1.34/cephfs
/test ci/centos/mini-e2e/k8s-1.34/cephfs
Still trying to use the old nfs-server:
Warning FailedMount 8s (x13 over 10m) kubelet MountVolume.SetUp failed for volume "pvc-c64d91d7-9097-46f3-9594-eb993e5851b7" : rpc error: code = Internal desc = nfs: failed to mount "relocated.example.net:/0001-0024-e044d94f-5dfb-4f7b-a7e6-44895f196074-0000000000000001-38cbb13b-1f15-4a9b-80ff-3017574691a1" to "/var/lib/kubelet/pods/4ebe7989-0889-4af1-b138-48c67a90debd/volumes/kubernetes.io~csi/pvc-c64d91d7-9097-46f3-9594-eb993e5851b7/mount" : mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs relocated.example.net:/0001-0024-e044d94f-5dfb-4f7b-a7e6-44895f196074-0000000000000001-38cbb13b-1f15-4a9b-80ff-3017574691a1 /var/lib/kubelet/pods/4ebe7989-0889-4af1-b138-48c67a90debd/volumes/kubernetes.io~csi/pvc-c64d91d7-9097-46f3-9594-eb993e5851b7/mount
Output: mount.nfs: Failed to resolve server relocated.example.net: Name or service not known
stderr: ""
It seems I missed handling of mutable_parameters in CreateVolume CSI procedure.
/test ci/centos/mini-e2e/k8s-1.34/cephfs