Skip to content

Modify host name with updated prefix#343

Merged
suryagupta4 merged 3 commits into
mainfrom
bug-1458-node-prefix
Sep 11, 2024
Merged

Modify host name with updated prefix#343
suryagupta4 merged 3 commits into
mainfrom
bug-1458-node-prefix

Conversation

@suryagupta4

@suryagupta4 suryagupta4 commented Sep 10, 2024

Copy link
Copy Markdown
Contributor

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 #
https://github.com/dell/csm/issues/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

@shanmydell shanmydell left a comment

Copy link
Copy Markdown
Contributor

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
@suryagupta4 suryagupta4 deleted the bug-1458-node-prefix branch September 11, 2024 16:53
Comment thread pkg/node/node.go
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