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

Nfs controller publish Changes #190

Merged
merged 36 commits into from
May 12, 2023
Merged

Conversation

VamsiSiddu-7
Copy link
Contributor

Description

This PR adds the support for nfs controller publish volume

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

  • I have Created a new image with the changes and installed the csi-powerflex driver
  • I have Executed helm test with volume creation and Controller publish of nfs,ext4,xfs volumes

return nil, status.Error(codes.NotFound,
"volume not found")
"filesystem not found")
Copy link
Contributor

Choose a reason for hiding this comment

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

update the message wrt to volume, to keep the consistency throughout.

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

@@ -873,15 +891,22 @@ func (s *service) ControllerPublishVolume(
fsID := getFilesystemIDFromCsiVolumeID(csiVolID)
fs, err := s.getFilesystemByID(fsID, systemID)
if err != nil {
if strings.EqualFold(err.Error(), sioGatewayVolumeNotFound) || strings.Contains(err.Error(), "must be a hexadecimal number") {
if strings.EqualFold(err.Error(), sioGatewayFilesystemNotFound) || strings.Contains(err.Error(), "must be a hexadecimal number") {
Copy link
Contributor

Choose a reason for hiding this comment

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

update the error scenario wrt to volume, to keep the consistency throughout.

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

}
return nil, status.Errorf(codes.Internal,
"failure checking volume status before controller publish: %s",
"failure checking filesystem status before controller publish: %s",
Copy link
Contributor

Choose a reason for hiding this comment

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

update the message wrt to volume, to keep the consistency throughout.

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

@@ -95,6 +98,8 @@ const (
removeModeOnlyMe = "ONLY_ME"
sioGatewayNotFound = "Not found"
sioGatewayVolumeNotFound = "Could not find the volume"
sioGatewayNFSExportNotFound = "couldn't find NFS export"
Copy link
Contributor

Choose a reason for hiding this comment

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

If this error code is not being used, we can remove its instance from here.

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

@VamsiSiddu-7
Copy link
Contributor Author

Hi @khareRajshree I have addressed your review comments. please review it again Thanks

@VamsiSiddu-7 VamsiSiddu-7 merged commit 2492d61 into nfs-support May 12, 2023
@VamsiSiddu-7 VamsiSiddu-7 deleted the nfs-control-pub-new branch June 28, 2023 06:31
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