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-249): optimize NFS mounter to use multiple targets #318

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Sep 5, 2024

TL;DR

Added a new function to determine the node's IP address based on routing to a target host.

What changed?

  • Introduced a new function GetNodeIpAddressByRouting in utils.go that determines the node's IP address by creating a UDP connection to a target host.
  • Updated the doMount function in nfsmount.go to use the new GetNodeIpAddressByRouting function, falling back to GetNodeIpAddress if it fails.
  • Added unit tests for the new GetNodeIpAddressByRouting function in utils_test.go.

How to test?

  1. Run the new unit tests in utils_test.go to verify the functionality of GetNodeIpAddressByRouting.
  2. Test the NFS mount process with different network configurations to ensure it correctly determines the node's IP address.
  3. Verify that the mount process falls back to the original GetNodeIpAddress function if GetNodeIpAddressByRouting fails.

Why make this change?

This change improves the accuracy of determining the node's IP address for NFS mounts, especially in complex network environments. By using routing information to determine the IP address, we can ensure that the correct network interface is used for NFS communications, potentially resolving issues related to multi-homed systems or specific network configurations.


feat(deps): implement InterfaceGroup.GetRandomIpAddress()

feat(deps): implement InterfaceGroup.GetRandomIpAddress()

refactor(deps): allow multimount for NFS

refactor(deps): unmount underlying FS straight after publishing volume

@graphite-app graphite-app bot requested a review from tigrawap September 5, 2024 06:57
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 94f7a10 to 23255f6 Compare September 5, 2024 07:05
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.

@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 23255f6 to 5f5b338 Compare September 5, 2024 08:57
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch 2 times, most recently from 2e3f570 to 8ec4141 Compare September 5, 2024 09:37
@sergeyberezansky sergeyberezansky changed the title feat(CSI-247): optimize NFS mounter to use multiple targets feat(CSI-247,CSI-249): optimize NFS mounter to use multiple targets Sep 8, 2024
@sergeyberezansky sergeyberezansky added the enhancement New feature or request label Sep 10, 2024
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from 58ac8ed to 8037bc4 Compare September 11, 2024 10:11
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 8ec4141 to 3ff4398 Compare September 11, 2024 10:11
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from 8037bc4 to 1269d0d Compare September 11, 2024 11:11
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 3ff4398 to 14cd967 Compare September 11, 2024 11:11
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from 1269d0d to 5945aac Compare September 11, 2024 11:35
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 14cd967 to a71ebde Compare September 11, 2024 11:35
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from 5945aac to 4ad8961 Compare September 11, 2024 11:51
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from a71ebde to 055b17d Compare September 11, 2024 11:51
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from 4ad8961 to ae27838 Compare September 11, 2024 13:02
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 055b17d to 117c5f4 Compare September 11, 2024 13:02
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from ae27838 to dabc35c Compare September 11, 2024 14:25
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 117c5f4 to 15d3ad8 Compare September 11, 2024 14:25
@sergeyberezansky sergeyberezansky changed the title feat(CSI-247,CSI-249): optimize NFS mounter to use multiple targets feat(CSI-249): optimize NFS mounter to use multiple targets Sep 12, 2024
Copy link
Collaborator Author

sergeyberezansky commented Sep 12, 2024

Merge activity

@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from dabc35c to 4740ca8 Compare September 12, 2024 12:00
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 15d3ad8 to ae01e9c Compare September 12, 2024 12:00
@sergeyberezansky sergeyberezansky force-pushed the sergey/csi-241-nfs-sync-map-fix branch from 4740ca8 to 50a5d3b Compare September 12, 2024 12:45
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from ae01e9c to 3c596c3 Compare September 12, 2024 12:45
@sergeyberezansky sergeyberezansky changed the base branch from sergey/csi-241-nfs-sync-map-fix to graphite-base/318 September 12, 2024 12:47
@sergeyberezansky sergeyberezansky force-pushed the sergey/simplify-nfs-mounter branch from 3c596c3 to f0d1291 Compare September 12, 2024 12:47
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/318 to dev September 12, 2024 12:48
@sergeyberezansky sergeyberezansky merged commit 2bb177e into dev Sep 12, 2024
14 of 21 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/simplify-nfs-mounter branch September 12, 2024 15:12
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