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

feat(CSI-247): implement InterfaceGroup.GetRandomIpAddress() #319

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Sep 5, 2024

TL;DR

Implemented random IP selection for NFS mounts and simplified mount reference counting.

What changed?

  • Added a new GetRandomIpAddress method to the InterfaceGroup struct, which selects a random IP address from the available IPs.
  • Modified GetNfsMountIp to use the new GetRandomIpAddress method instead of GetIpAddress.
  • Removed reference counting logic from the nfsMount struct, including the refCount field and associated lock.
  • Simplified incRef and decRef methods to always perform mount and unmount operations, respectively.

How to test?

  1. Test the new GetRandomIpAddress method by calling it multiple times and verifying that different IPs are returned.
  2. Verify that NFS mounts now use randomly selected IP addresses.
  3. Test mounting and unmounting operations to ensure they work correctly without reference counting.
  4. Check that concurrent mount operations are handled properly.

Why make this change?

  • Random IP selection for NFS mounts improves load balancing across available IPs.
  • Simplifying the mount reference counting reduces complexity and potential race conditions.
  • These changes aim to enhance the reliability and performance of NFS mount operations in the system.

feat(CSI-247): implement InterfaceGroup.GetRandomIpAddress()

feat(CSI-247): optimize NFS by utilizing multiple targets

@graphite-app graphite-app bot requested a review from tigrawap September 5, 2024 08:58
Copy link

graphite-app bot commented Sep 5, 2024

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (09/05/24)

1 reviewer was added to this PR based on Sergey Berezansky's automation.

Copy link
Collaborator Author

sergeyberezansky commented Sep 12, 2024

Merge activity

@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/319 to dev September 12, 2024 13:11
@sergeyberezansky sergeyberezansky merged commit 286aac6 into dev Sep 12, 2024
12 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/multi-ip-nfs branch September 12, 2024 15:12
@sergeyberezansky sergeyberezansky added enhancement New feature or request and removed feature labels Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant