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-305): change mount Map logic for WEKAFS to align with NFS and support same fs name on SCMC #383

Merged
merged 7 commits into from
Nov 7, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Oct 31, 2024

TL;DR

Refactored mount handling to improve container name management and mount reference counting.

What changed?

  • Added container name caching to ApiClient
  • Introduced EnsureLocalContainer method to handle container name resolution
  • Simplified mount reference counting using a flat map structure
  • Added utility function to extract container names from mount points
  • Fixed duplicate reference count increment in NFS mounting
  • Added comprehensive test coverage for container name extraction
  • Improved logging for mount operations and debugging

How to test?

  1. Test mounting filesystems with different container configurations
  2. Verify container name extraction from mount points using the new test cases
  3. Check mount reference counting behavior with multiple mount/unmount operations
  4. Validate logging output for mount operations
  5. Test compatibility with both legacy and new mounting scenarios

Why make this change?

  • Improves reliability of container name handling in multi-cluster environments
  • Simplifies mount reference counting logic to prevent memory leaks
  • Enhances debugging capabilities through better logging
  • Reduces code duplication and potential race conditions
  • Makes the codebase more maintainable and testable

@graphite-app graphite-app bot requested a review from tigrawap October 31, 2024 16:04
Copy link

graphite-app bot commented Oct 31, 2024

Graphite Automations

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

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

@sergeyberezansky sergeyberezansky force-pushed the sergey/add-cluster-guid-to-mount-map branch from 425fc60 to 97718af Compare November 1, 2024 10:04
@sergeyberezansky sergeyberezansky changed the base branch from dev to sergey/multi-arch November 1, 2024 10:04
@sergeyberezansky sergeyberezansky force-pushed the sergey/add-cluster-guid-to-mount-map branch 4 times, most recently from 084c3ea to 8839d71 Compare November 3, 2024 17:43
@sergeyberezansky sergeyberezansky changed the base branch from sergey/multi-arch to graphite-base/383 November 7, 2024 10:18
@sergeyberezansky sergeyberezansky force-pushed the sergey/add-cluster-guid-to-mount-map branch from 8839d71 to 8f386ec Compare November 7, 2024 10:18
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/383 to dev November 7, 2024 10:18
@sergeyberezansky sergeyberezansky force-pushed the sergey/add-cluster-guid-to-mount-map branch from 8f386ec to dbdd772 Compare November 7, 2024 10:19
@sergeyberezansky sergeyberezansky merged commit 4851adb into dev Nov 7, 2024
12 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/add-cluster-guid-to-mount-map branch November 28, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant