Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create NFS volume #189

Merged
merged 8 commits into from
May 11, 2023
Merged

Create NFS volume #189

merged 8 commits into from
May 11, 2023

Conversation

khareRajshree
Copy link
Contributor

Description

This PR includes changes done in CreateVolume() and ControllerPublishVolume() to support NFS volume creation.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#763

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • New image for driver is built with the changes and driver installed with that image, reflecting the changes for CreateVolume REQ and RESP as well as for ControllerPublishVolume REQ and RESP
  • Helm test executed with creation of Block and NFS volumes.

CreateVolume (REQ-RESP)

fstype: NFS

time="2023-05-07T13:03:26Z" level=info msg="/csi.v1.Controller/CreateVolume: REQ 0017: Name=k8s-ac0ba19e9c, CapacityRange=required_bytes:3221225472 , VolumeCapabilities=[mount:<fs_type:\"nfs\" > access_mode:<mode:SINGLE_NODE_MULTI_WRITER > ], Parameters=map[allowRoot:false csi.storage.k8s.io/pv/name:k8s-ac0ba19e9c csi.storage.k8s.io/pvc/name:pvol2 csi.storage.k8s.io/pvc/namespace:helmtest-vxflexos nasName:env8nasserver nfsAcls:0777 storagepool:Env8-SP-SW_SSD-1 systemID:05d539c3cdc5280f], AccessibilityRequirements=requisite:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f-nfs\" value:\"csi-vxflexos.dellemc.com\" > > preferred:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f-nfs\" value:\"csi-vxflexos.dellemc.com\" > > , XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

time="2023-05-07T13:03:40Z" level=info msg="/csi.v1.Controller/CreateVolume: REP 0017: Volume=capacity_bytes:8796093022208 volume_id:\"05d539c3cdc5280f/6457a1a0-d8f2-c077-7899-2a50fb1ccff3\" volume_context:<key:\"CreationTime\" value:\"1970-01-01 00:00:00 +0000 UTC\" > volume_context:<key:\"InstallationID\" value:\"04cfcf6a7ded067f\" > volume_context:<key:\"Name\" value:\"k8s-ac0ba19e9c\" > volume_context:<key:\"NasServerID\" value:\"64132f37-d33e-9d4a-89ba-d625520a4779\" > volume_context:<key:\"StoragePoolID\" value:\"28515fee00000000\" > volume_context:<key:\"StoragePoolName\" value:\"Env8-SP-SW_SSD-1\" > volume_context:<key:\"StorageSystem\" value:\"05d539c3cdc5280f\" > volume_context:<key:\"fsType\" value:\"nfs\" > volume_context:<key:\"nasName\" value:\"env8nasserver\" > volume_context:<key:\"nfsAcls\" value:\"0777\" > accessible_topology:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f-nfs\" value:\"true\" > > , XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

fstype: ext4

time="2023-05-07T13:03:42Z" level=info msg="/csi.v1.Controller/CreateVolume: REQ 0018: Name=k8s-c74c3c5e00, CapacityRange=required_bytes:8589934592 , VolumeCapabilities=[mount:<fs_type:\"ext4\" > access_mode:<mode:SINGLE_NODE_MULTI_WRITER > ], Parameters=map[csi.storage.k8s.io/pv/name:k8s-c74c3c5e00 csi.storage.k8s.io/pvc/name:pvol0 csi.storage.k8s.io/pvc/namespace:helmtest-vxflexos storagepool:Env8-SP-SW_SSD-1 systemID:05d539c3cdc5280f], AccessibilityRequirements=requisite:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f\" value:\"csi-vxflexos.dellemc.com\" > > preferred:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f\" value:\"csi-vxflexos.dellemc.com\" > > , XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

time="2023-05-07T13:03:43Z" level=info msg="/csi.v1.Controller/CreateVolume: REP 0018: Volume=capacity_bytes:8589934592 volume_id:\"05d539c3cdc5280f-2488f1390000002c\" volume_context:<key:\"CreationTime\" value:\"2023-05-07 12:58:13 +0000 UTC\" > volume_context:<key:\"InstallationID\" value:\"04cfcf6a7ded067f\" > volume_context:<key:\"Name\" value:\"k8s-c74c3c5e00\" > volume_context:<key:\"StoragePoolID\" value:\"28515fee00000000\" > volume_context:<key:\"StoragePoolName\" value:\"Env8-SP-SW_SSD-1\" > volume_context:<key:\"StorageSystem\" value:\"05d539c3cdc5280f\" > volume_context:<key:\"fsType\" value:\"ext4\" > accessible_topology:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f\" value:\"csi-vxflexos.dellemc.com\" > > , XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

fstype: xfs

time="2023-05-07T13:03:42Z" level=info msg="/csi.v1.Controller/CreateVolume: REQ 0019: Name=k8s-2a2e16e7d8, CapacityRange=required_bytes:12884901888 , VolumeCapabilities=[mount:<fs_type:\"xfs\" > access_mode:<mode:SINGLE_NODE_MULTI_WRITER > ], Parameters=map[csi.storage.k8s.io/pv/name:k8s-2a2e16e7d8 csi.storage.k8s.io/pvc/name:pvol1 csi.storage.k8s.io/pvc/namespace:helmtest-vxflexos storagepool:Env8-SP-SW_SSD-1 systemID:05d539c3cdc5280f], AccessibilityRequirements=requisite:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f\" value:\"csi-vxflexos.dellemc.com\" > > preferred:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f\" value:\"csi-vxflexos.dellemc.com\" > > , XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

time="2023-05-07T13:03:43Z" level=info msg="/csi.v1.Controller/CreateVolume: REP 0019: Volume=capacity_bytes:17179869184 volume_id:\"05d539c3cdc5280f-2488f13a0000002e\" volume_context:<key:\"CreationTime\" value:\"2023-05-07 12:58:13 +0000 UTC\" > volume_context:<key:\"InstallationID\" value:\"04cfcf6a7ded067f\" > volume_context:<key:\"Name\" value:\"k8s-2a2e16e7d8\" > volume_context:<key:\"StoragePoolID\" value:\"28515fee00000000\" > volume_context:<key:\"StoragePoolName\" value:\"Env8-SP-SW_SSD-1\" > volume_context:<key:\"StorageSystem\" value:\"05d539c3cdc5280f\" > volume_context:<key:\"fsType\" value:\"xfs\" > accessible_topology:<segments:<key:\"csi-vxflexos.dellemc.com/05d539c3cdc5280f\" value:\"csi-vxflexos.dellemc.com\" > > , XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

ControllerPublishVolume (REQ-RESP)

fstype: ext4

time="2023-05-07T13:03:44Z" level=info msg="/csi.v1.Controller/ControllerPublishVolume: REQ 0020: VolumeId=05d539c3cdc5280f-2488f1390000002c, NodeId=F57AFEF1-2273-5DFB-8D5A-3763F475335F, VolumeCapability=mount:<fs_type:\"ext4\" > access_mode:<mode:SINGLE_NODE_MULTI_WRITER > , Readonly=false, VolumeContext=map[CreationTime:2023-05-07 12:58:13 +0000 UTC InstallationID:04cfcf6a7ded067f Name:k8s-c74c3c5e00 StoragePoolID:28515fee00000000 StoragePoolName:Env8-SP-SW_SSD-1 StorageSystem:05d539c3cdc5280f fsType:ext4 storage.kubernetes.io/csiProvisionerIdentity:1683463844719-8081-csi-vxflexos.dellemc.com], XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

time="2023-05-07T13:03:44Z" level=info msg="/csi.v1.Controller/ControllerPublishVolume: REP 0020: XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

fstype: xfs

time="2023-05-07T13:03:44Z" level=info msg="/csi.v1.Controller/ControllerPublishVolume: REQ 0021: VolumeId=05d539c3cdc5280f-2488f13a0000002e, NodeId=F57AFEF1-2273-5DFB-8D5A-3763F475335F, VolumeCapability=mount:<fs_type:\"xfs\" > access_mode:<mode:SINGLE_NODE_MULTI_WRITER > , Readonly=false, VolumeContext=map[CreationTime:2023-05-07 12:58:13 +0000 UTC InstallationID:04cfcf6a7ded067f Name:k8s-2a2e16e7d8 StoragePoolID:28515fee00000000 StoragePoolName:Env8-SP-SW_SSD-1 StorageSystem:05d539c3cdc5280f fsType:xfs storage.kubernetes.io/csiProvisionerIdentity:1683463844719-8081-csi-vxflexos.dellemc.com], XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

time="2023-05-07T13:03:44Z" level=info msg="/csi.v1.Controller/ControllerPublishVolume: REP 0021: XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

fstype: nfs

time="2023-05-07T13:03:44Z" level=info msg="/csi.v1.Controller/ControllerPublishVolume: REQ 0022: VolumeId=05d539c3cdc5280f/6457a1a0-d8f2-c077-7899-2a50fb1ccff3, NodeId=F57AFEF1-2273-5DFB-8D5A-3763F475335F, VolumeCapability=mount:<fs_type:\"nfs\" > access_mode:<mode:SINGLE_NODE_MULTI_WRITER > , Readonly=false, VolumeContext=map[CreationTime:1970-01-01 00:00:00 +0000 UTC InstallationID:04cfcf6a7ded067f Name:k8s-ac0ba19e9c NasServerID:64132f37-d33e-9d4a-89ba-d625520a4779 StoragePoolID:28515fee00000000 StoragePoolName:Env8-SP-SW_SSD-1 StorageSystem:05d539c3cdc5280f fsType:nfs nasName:env8nasserver nfsAcls:0777 storage.kubernetes.io/csiProvisionerIdentity:1683463844719-8081-csi-vxflexos.dellemc.com], XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

time="2023-05-07T13:03:44Z" level=info msg="/csi.v1.Controller/ControllerPublishVolume: REP 0022: PublishContext=map[nasName:env8nasserver nfsAcls:0777], XXX_NoUnkeyedLiteral={}, XXX_sizecache=0"

@VamsiSiddu-7
Copy link
Contributor

@khareRajshree can you please update the goscaleio module with main branch


if len(name) > 31 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this name check for nfs volumes also.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@khareRajshree khareRajshree merged commit 4be7c48 into nfs-support May 11, 2023
@khareRajshree khareRajshree deleted the nfs-create-volume branch July 3, 2023 13:09
VamsiSiddu-7 added a commit that referenced this pull request Jul 20, 2023
* Add CheckNFS functionality to check the NFS support for given powerflex array. (#182)

* Add checkNfs method.

* add version check in checkNFS.

* changed the nfs topology to true.

* add debug.

* add debug1.

* add debug3.

* removed the version logic.

* add debug 4.

* move logic to service.go

* add debug 5

* add debug 6

* add debug 7.

* add debug 8.

* removed the debug logs.

* unit test changes for nodeGetInfo.

* updated go mod and go sum.

* Added new storageclass for NFS support (#181)

Added new storageclass for NFS support

* helm chart update for nfs support (#183)

* helm chart update for nfs support

* Check nfs  (#185)

* Add checkNfs method.

* Add helm tests for nfs feature (#188)

* added helm tests for nfs.

* fixed a small mistake in the 5vols-nfs test.

* removed the ephemeral volume helm tests.

* making one signed commit (#187)

* Create NFS volume (#189)

* create NFS volume implemented

* Nfs controller publish Changes (#190)

* indentation fixed for controller.yaml

* NFS storage class yaml updated

* create NFS volume implemented

* go.mod and go.sum updated

* update controller publish volume for nfs.

* hardcoded volume name for testing.

* add debug.

* files updated

* add debug.

* removed debug statements

* add debug.

* fixed error.

* fix the panic.

* add debug.

* fixed the nil panic.

* fixed the nfs export.

* fix nfs export error.

* files updated

* updated files.

* files updated

* removed debug logs.

* remove debug logs.

* add debug.

* add debug.

* add debug3.

* fixed a mistake.

* add debug.

* fixed th idempotency.

* remove debug logs.

* removed the hardcoded name.

* address review comments.

---------

Co-authored-by: Khare <rajshree.khare@dell.com>

* Update NodePublish Volume for nfs. (#193)

* update nodeunpublish volume for nfs changes. (#211)

* added delete filesystem support in deletevolume (#212)

* controller unpublish changes added (#214)

* update build_ubi_micro.sh to include nfs-utils.

* fix lint and unit-test failures.

* fixed the gosec failures.

* fix replication unit test failure.

* add unit tests for nfs.

* fixed the unit test failure.

* add induced errors to get handler.

* add unit tests for delete control node publish unpublish fns.

* fixed the unit test failures.

* add more unit tests.

* NFS: expand volume operation added (#216)

* linting errors resolved

* unit tests added for expand NFS volume

* unit tests added for expand NFS volume

* unit tests added for expand NFS volume

* add more unit-test.

* add more unit tests.

* add more unit tests for coverage.

* addressed review comments.

---------

Co-authored-by: KshitijaKakde <111420075+KshitijaKakde@users.noreply.github.com>
Co-authored-by: Rajshree Khare <69839943+khareRajshree@users.noreply.github.com>
Co-authored-by: ashleyvjoy <110008193+ashleyvjoy@users.noreply.github.com>
Co-authored-by: Khare <rajshree.khare@dell.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants