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

Check nfs #185

Merged
merged 17 commits into from
Apr 25, 2023
Merged

Check nfs #185

merged 17 commits into from
Apr 25, 2023

Conversation

khareRajshree
Copy link
Contributor

@khareRajshree khareRajshree commented Apr 25, 2023

Description

This PR includes the changes for implementation of checkNFS method in service.go which will verify whether the underlying array supports nfs.

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

  • Installed csi-powerflex driver with 4.0 array with nfsAcls and externalAccess configured in the config.yaml/values.yaml and with nas name configured in the secret, successful call made for checkNFS().
k describe pod vxflexos-controller-7f578b6749-jxm7s -n vxflexos

 driver:
   Container ID:  containerd://dbe4aea6483d58722b390f4fa0a5d31b5d448533ced3c44e2348eb3580327d8b
   Image:         amaas-eos-mw1.cec.lab.emc.com:5036/csi-vxflexos:vnfs-support
   Image ID:      amaas-eos-mw1.cec.lab.emc.com:5036/csi-vxflexos@sha256:4f33a61db8e8a1137eea116baf68de6a713d47a3683c35bf5da9ce34cafb8e05
   Port:          <none>
   Host Port:     <none>
   Command:
     /csi-vxflexos.sh
   Args:
     --leader-election
     --array-config=/vxflexos-config/config
     --driver-config-params=/vxflexos-config-params/driver-config-params.yaml
   State:          Running
     Started:      Tue, 25 Apr 2023 04:49:13 -0400
   Ready:          True
   Restart Count:  0
   Environment:
     CSI_ENDPOINT:                             /var/run/csi/csi.sock
     X_CSI_MODE:                               controller
     X_CSI_VXFLEXOS_ENABLESNAPSHOTCGDELETE:    false
     X_CSI_VXFLEXOS_ENABLELISTVOLUMESNAPSHOT:  false
     SSL_CERT_DIR:                             /certs
     X_CSI_NFS_ACLS:                           0777
     X_CSI_POWERFLEX_EXTERNAL_ACCESS:          10.247.96.84
   Mounts:
     /var/run/csi from socket-dir (rw)
     /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-89jwr (ro)
     /vxflexos-config from vxflexos-config (rw)
     /vxflexos-config-params from vxflexos-config-params (rw)

controller logs for driver container:

k logs vxflexos-controller-7f578b6749-6nlw4 -n vxflexos -c driver

I0425 08:49:11.705190       1 leaderelection.go:248] attempting to acquire leader lease vxflexos/driver-csi-vxflexos-dellemc-com...
I0425 08:49:30.129447       1 leaderelection.go:258] successfully acquired lease vxflexos/driver-csi-vxflexos-dellemc-com
time="2023-04-25T08:49:30Z" level=info msg="configured 05d539c3cdc5280f" allSystemNames= endpoint="https://10.225.109.54" isDefault=true nasName=0xc0003e0c30 nfsAcls=0777 password="********" skipCertificateValidation=true systemID=05d539c3cdc5280f user=admin
time="2023-04-25T08:49:30Z" level=info msg="driver configuration file " file=/vxflexos-config-params/driver-config-params.yaml
time="2023-04-25T08:49:30Z" level=info msg="Read CSI_LOG_FORMAT from log configuration file" format=text
time="2023-04-25T08:49:30Z" level=info msg="Read CSI_LOG_LEVEL from log configuration file" fields.level=debug
time="2023-04-25T08:49:30Z" level=info msg="array configuration file" file=/vxflexos-config/config
time="2023-04-25T08:49:30Z" level=info msg="Probing all arrays. Number of arrays: 1"
time="2023-04-25T08:49:30Z" level=info msg="Found Name for system=block-legacy-gateway with ID=05d539c3cdc5280f"
time="2023-04-25T08:49:30Z" level=info msg="default array is set to array ID: 05d539c3cdc5280f"
time="2023-04-25T08:49:30Z" level=info msg="05d539c3cdc5280f is the default array, skipping VolumePrefixToSystems map update. \n"
time="2023-04-25T08:49:30Z" level=info msg="array 05d539c3cdc5280f probed successfully"
time="2023-04-25T08:49:30Z" level=info msg="configured csi-vxflexos.dellemc.com" IsApproveSDCEnabled=false IsHealthMonitorEnabled=false IsSdcRenameEnabled=false allowRWOMultiPodAccess=false autoprobe=true externalAccess=10.247.96.84 mode=controller nfsAcls=0777 privatedir=/dev/disk/csi-vxflexos sdcGUID= sdcPrefix= thickprovision=false

@khareRajshree khareRajshree merged commit aa6ba28 into nfs-support Apr 25, 2023
@VamsiSiddu-7 VamsiSiddu-7 deleted the check-nfs branch June 28, 2023 06:44
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.

4 participants