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

Add retry to reading /proc/mounts out of ListMounts() function #246

Closed
wants to merge 1 commit into from

Conversation

Shellmode
Copy link
Contributor

Issue #, if available:
#174

Description of changes:
Since it's unclear why the driver cannot read /host/proc/mounts (with Karpenter) at the first time, retry to read /host/proc/mounts will success.
We've discussed in #229

Recently released v1.8 added retry in the ListMounts() function, however I tried the new release and got the same error message still cannot mount S3. I found that if ListMounts() function ever return a nil, error it won't work.

Just leave error handling in parseProcMounts() function and retry reading /proc/mounts by calling ListMounts() function from other function, which will work.

It may be somehow confusing about "retry", it may because other function/module refresh/restart which fix the issue (just like restart the pod).

Passed locally test
image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.


if err != nil {
return nil, fmt.Errorf("Failed to read %s after %d tries: %w", pml.ProcMountPath, procMountsReadMaxRetry, err)
klog.Errorf("Failed to read %s on try %d: %v", pml.ProcMountPath, ProcMountsReadRetry, err)
ProcMountsReadRetry += 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block basically ignores the error and returns an empty response. Although it won't fail, some operations depending on this result e.g., unmounting and skipping already mounted paths won't work.

@dannycjones
Copy link
Contributor

We'll close this for now due to inactivity.

@dannycjones dannycjones closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants