Skip to content

s3fs: remove password file after unmounting #175

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

Open
wants to merge 4 commits into
base: grpc-01
Choose a base branch
from
Open

Conversation

ashimagarg27
Copy link
Member

@ashimagarg27 ashimagarg27 commented May 13, 2025

Describe your changes

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • I have made sure existing UTs are not impacted
  • I have executed all necessary linter and made sure internal pipeline/travis is not broken

Copy link
Member

@mssachan mssachan left a comment

Choose a reason for hiding this comment

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

Code changes looks good. Added minor comments. PTAL


var metaRoot string
if mountWorker {
metaRoot = constants.WorkerNodeMounterPath
Copy link
Member

Choose a reason for hiding this comment

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

RenameMounter
WorkerNodeMounterPath ---> MounterConfigPathOnHost

if mountWorker {
metaRoot = constants.WorkerNodeMounterPath
} else {
metaRoot = "/var/lib/ibmc-s3fs"
Copy link
Member

Choose a reason for hiding this comment

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

Declare this as constant.
MounterConfigPathOnPod="/var/lib/ibmc-s3fs"

return nil
}
klog.Info("NodeServer Unmounting...")
return s3fs.MounterUtils.FuseUnmount(target)
err = s3fs.MounterUtils.FuseUnmount(target)
Copy link
Member

Choose a reason for hiding this comment

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

Move this logic to else section and keep password file deletion logic at one place only at the end.

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.

2 participants