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

Support nfs in processMounts #2787

Merged
merged 1 commit into from
Jan 23, 2021

Conversation

gjkim42
Copy link
Contributor

@gjkim42 gjkim42 commented Jan 17, 2021

Fix kubenetes issue kubernetes/kubernetes#98009

Helps with the situation when the kubelet starts with --root-dir=$NFS_DIR.

@google-cla google-cla bot added the cla: yes label Jan 17, 2021
@k8s-ci-robot
Copy link
Collaborator

Hi @gjkim42. Thanks for your PR.

I'm waiting for a google member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@gjkim42
Copy link
Contributor Author

gjkim42 commented Jan 17, 2021

/cc @bobbypage
Would you take a look at this? Thanks.

@gjkim42 gjkim42 force-pushed the support-nfs-in-processmounts branch from 787e08d to 63d2c10 Compare January 17, 2021 09:18
@gjkim42 gjkim42 force-pushed the support-nfs-in-processmounts branch from 63d2c10 to adaddcc Compare January 17, 2021 15:57
@gjkim42 gjkim42 changed the title Support nfs FsType in processMounts Support nfs in processMounts Jan 17, 2021
@bobbypage
Copy link
Collaborator

/ok-to-test

fs/fs.go Outdated
@@ -170,7 +170,7 @@ func processMounts(mounts []*mount.Info, excludedMountpointPrefixes []string) ma
partitions := make(map[string]partition)

supportedFsType := map[string]bool{
// all ext systems are checked through prefix.
// all ext and nfs systems are checked through prefix.
Copy link
Collaborator

@bobbypage bobbypage Jan 22, 2021

Choose a reason for hiding this comment

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

is there any reason we can't just add "nfs" : true to supportedFsType as opposed to special casing it below?

I'm not clear why "ext" is special cased unlike all the other file system types here.

Copy link
Contributor Author

@gjkim42 gjkim42 Jan 22, 2021

Choose a reason for hiding this comment

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

I think "ext" was special cased because there are a number of ext filesystems. (ext3, ext4...)
And there are a number of NFS too. (nfs3, nfs4...)
Do you prefer to add "nfs3": true, "nfs4": true?

Copy link
Collaborator

@bobbypage bobbypage Jan 22, 2021

Choose a reason for hiding this comment

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

I see, that makes sense.

I'm fine with either, but if you think the prefix check is easier, let's update the comment to make it clear why some fs type check via prefix vs some in supportedFsType (i.e. your explanation regarding "version number" of filesystem).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated :)

Copy link
Collaborator

Choose a reason for hiding this comment

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

thanks!

@gjkim42 gjkim42 force-pushed the support-nfs-in-processmounts branch from adaddcc to a228e69 Compare January 23, 2021 01:36
@bobbypage bobbypage merged commit 19e51c8 into google:master Jan 23, 2021
@gjkim42 gjkim42 deleted the support-nfs-in-processmounts branch January 23, 2021 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants