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

fix(CSI-241): disregard sync_on_close in mountmap per FS #310

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Sep 2, 2024

TL;DR

Introduced a new AsMapKey() method for MountOptions to create version-agnostic map keys.

What changed?

  • Added a new AsMapKey() method to the MountOptions struct in mountoptions.go.
  • This method creates a version of the mount options that excludes certain options (currently only MountOptionSyncOnClose) to be used as a map key.
  • Updated mounter.go to use AsMapKey() instead of String() when accessing or modifying the mountMap.

How to test?

Covered by unit testing

Why make this change?

This change allows for more consistent handling of mount options across different versions of the Weka cluster / client. By excluding version-specific options like MountOptionSyncOnClose from the map key, we can avoid unnecessary duplication of mounts and ensure that mounts with the same essential options are treated as identical, regardless of version-specific differences.


Copy link

graphite-app bot commented Sep 2, 2024

Graphite Automations

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

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

@sergeyberezansky sergeyberezansky changed the base branch from dev to sergey/custom-ca-cert September 11, 2024 10:10
Copy link
Collaborator Author

sergeyberezansky commented Sep 12, 2024

Merge activity

  • Sep 12, 6:10 AM EDT: @sergeyberezansky started a stack merge that includes this pull request via Graphite.
  • Sep 12, 6:18 AM EDT: Graphite rebased this pull request as part of a merge.
  • Sep 12, 6:20 AM EDT: Graphite rebased this pull request as part of a merge.
  • Sep 12, 6:25 AM EDT: @sergeyberezansky merged this pull request with Graphite.

@sergeyberezansky sergeyberezansky changed the base branch from sergey/custom-ca-cert to graphite-base/310 September 12, 2024 10:10
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/310 to dev September 12, 2024 10:16
@sergeyberezansky sergeyberezansky merged commit 8455a9b into dev Sep 12, 2024
11 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/mount-map-no-sync branch September 29, 2024 10:37
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