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

Modify host name with updated prefix #343

Merged
merged 3 commits into from
Sep 11, 2024
Merged

Conversation

suryagupta4
Copy link
Contributor

@suryagupta4 suryagupta4 commented Sep 10, 2024

Description

This PR includes:

  • Update the host name on the array when for the same uniquely identified host, we have different host name and node id. This will happen when the driver is reinstalled with a different prefix other than the one for which host entry was created earlier.
  • Removed the redundant computation of node id : s.nodeID = host.Name + "-" + ip.String()
  • golangci-lint fixes in pkg/array/array.go

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1458

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 the driver with default prefix and reinstalled with a different prefix. The host name was getting updated on both the array and the cluster.
    image

image

  • Created a volume and a pod consuming it. Written some data into the pod and then reinstalled the driver with a different prefix. The volume was still attached on the array and there were no changes seen in the pod, pv status on the cluster. The data written was found when logged into the pod.

  • Similar test as above. This time made sure after pod deletion; next time the pod goes to another node. In this scenario also, the data was found when logged into the pod.

  • UT
    image

@suryagupta4 suryagupta4 self-assigned this Sep 10, 2024
Copy link
Contributor

@shanmydell shanmydell left a comment

Choose a reason for hiding this comment

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

LGTM

@suryagupta4 suryagupta4 merged commit 3108c1d into main Sep 11, 2024
5 checks passed
@suryagupta4 suryagupta4 deleted the bug-1458-node-prefix branch September 11, 2024 16:53
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.

5 participants