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-274): add sleep before mount if nfs was reconfigured #353

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

sergeyberezansky
Copy link
Collaborator

@sergeyberezansky sergeyberezansky commented Oct 8, 2024

TL;DR

Refactored NFS permission and client group management functions to improve error handling and configuration updates.

What changed?

  • Modified EnsureNfsPermission to return a boolean indicating if a new permission was created.
  • Updated EnsureCsiPluginNfsClientGroup to return a boolean for new group creation.
  • Adjusted EnsureNfsClientGroupRuleForIp to return a boolean for new rule creation.
  • Implemented a configuration update check in EnsureNfsPermissions to determine if a wait period is necessary.
  • Added a 5-second wait after configuration changes to allow for proper application.

How to test?

  1. Test creating new NFS permissions, client groups, and rules.
  2. Verify that existing configurations are not modified unnecessarily.
  3. Ensure that the 5-second wait is only applied when new configurations are created.
  4. Check that error handling and return values are consistent with the new function signatures.

Why make this change?

This refactoring ensures that NFS mount is not attempted right after NFS cluster reconfiguration (which is asynchronous), since otherwise it might fail.
The delay is added only upon config change is inflicted, reducing unnecessary waits when configurations already exist.

These changes will lead to better performance and more reliable NFS setup processes in the CSI plugin, as well as shorter provisioning time

@graphite-app graphite-app bot requested a review from tigrawap October 8, 2024 08:33
Copy link

graphite-app bot commented Oct 8, 2024

Graphite Automations

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

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

Copy link
Collaborator Author

sergeyberezansky commented Oct 8, 2024

Merge activity

  • Oct 8, 11:10 AM EDT: @sergeyberezansky started a stack merge that includes this pull request via Graphite.
  • Oct 8, 12:26 PM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 8, 12:29 PM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 8, 12:48 PM EDT: @sergeyberezansky merged this pull request with Graphite.

@sergeyberezansky sergeyberezansky changed the base branch from sergey/allow-unpublish-on-stale-file-handle to graphite-base/353 October 8, 2024 16:01
@sergeyberezansky sergeyberezansky changed the base branch from graphite-base/353 to dev October 8, 2024 16:24
@sergeyberezansky sergeyberezansky merged commit 2e71a83 into dev Oct 8, 2024
12 checks passed
@sergeyberezansky sergeyberezansky deleted the sergey/wait-on-nfs-reconfig branch October 15, 2024 17:35
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