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

refactor(CSI-250): do not maintain redundant active mounts from node server after publishing volume #320

Merged
merged 3 commits into from
Sep 12, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Sep 5, 2024

TL;DR

Added "sync,async" to mutually exclusive mount options and optimized mount handling in the CSI driver.

What changed?

  • Added "sync,async" to the list of mutually exclusive mount options in values.yaml.
  • Refactored nfsMounter to remove the mountMap and associated locking mechanism.
  • Updated NewMount method to create a new nfsMount object on each call.
  • Modified mountWithOptions to merge mutually exclusive options.
  • Simplified unmountWithOptions to directly use the new mount object.
  • Commented out inactive mount logging and garbage collection functions.
  • Updated NodePublishVolume to defer unmounting of the parent filesystem.
  • Removed volume unmounting from NodeUnpublishVolume.

How to test?

  1. Deploy the CSI driver with the updated chart.
  2. Test concurrent mount and unmount operations to ensure stability.
  3. Monitor logs for any unexpected behavior or errors related to mount handling.

Why make this change?

This change aims to improve the handling of mount options and simplify the mount management process. By adding "sync" and "async" to the mutually exclusive options, we prevent potential conflicts in mount configurations, which might be caused by translating WekaFS mount options to NFS mount options.
The refactoring of the nfsMounter removes the need for a complex mount map and associated locking, which should lead to better performance and reduced complexity. These changes should result in more reliable and efficient volume mounting and unmounting operations in the CSI driver.


@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.

@sergeyberezansky sergeyberezansky force-pushed the sergey/nfs-mounter-mapless branch 4 times, most recently from 1c31418 to 966cdfd Compare September 5, 2024 14:52
@sergeyberezansky sergeyberezansky added the enhancement New feature or request label Sep 10, 2024
Copy link
Collaborator Author

sergeyberezansky commented Sep 12, 2024

Merge activity

@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/320 to dev September 12, 2024 13:21
@sergeyberezansky sergeyberezansky merged commit 5b2404c into dev Sep 12, 2024
11 of 12 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/nfs-mounter-mapless 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