-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
[Kubelet] Use the custom mounter script for Nfs and Glusterfs only #35821
Conversation
Jenkins unit/integration failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE Node e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history. The magic incantation to run this job again is |
Jenkins Kubemark GCE e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history. The magic incantation to run this job again is |
Jenkins GCE etcd3 e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history. The magic incantation to run this job again is |
bfc1ee6
to
0baf799
Compare
func (mounter *Mounter) Mount(source string, target string, fstype string, options []string) error { | ||
// Path to mounter binary. Set of mount accessible via $PATH by default. | ||
mounterPath := "mount" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put a constant for "mount" as DefaultMountPath so that both mount.go and mount_linux.go can use the constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} | ||
// Use the custom mounter when mounting nfs or glusterfs only. | ||
// TODO (storage-team) Remove this hack! | ||
if strings.Contains(fstype, "nfs") || strings.Contains(fstype, "gluster") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we put a constant list for "nfs", "gluster" so that it is easier to update the list? We can also do it later separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a TOTAL HACK. Is this just for risk mitigation? I'm all for being safe, but this seems a step too far to me...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like it either. It is the solution of choice currently for the goog storage team.
0baf799
to
c3001fd
Compare
@jingxu97 rebased |
For the record, this PR makes changes that are GCI specific (limiting scope of customized mounter to just NFS and GCI). In theory, we can make kubelet logic generic to use a customized mounter for all filesystem types excepting ext4, tmpfs and bind mounts and have the mounter script accept requests for "nfs" and "glusterfs". If this change is desirable, it can be done in a separate PR. |
d985de2
to
31ec6ac
Compare
@@ -67,7 +67,7 @@ func (realConntracker) SetTCPEstablishedTimeout(seconds int) error { | |||
func isSysFSWritable() (bool, error) { | |||
const permWritable = "rw" | |||
const sysfsDevice = "sysfs" | |||
m := mount.New() | |||
m := mount.New("" /* default mount path */) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would prefer NewDefault()
} | ||
// Use the custom mounter when mounting nfs or glusterfs only. | ||
// TODO (storage-team) Remove this hack! | ||
if strings.Contains(fstype, "nfs") || strings.Contains(fstype, "gluster") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a TOTAL HACK. Is this just for risk mitigation? I'm all for being safe, but this seems a step too far to me...
Jenkins verification failed for commit 31ec6ac. Full PR test history. The magic incantation to run this job again is |
This reverts commit 765f7b9.
3bd69a0
to
40fc804
Compare
As per @jingxu97's offline message, I'm marking this PR LGTM since all the open comments have been addressed. |
} | ||
// These filesystem types are expected to be supported by the mount utility on the host across all Linux distros. | ||
var defaultMounterFsTypes = sets.NewString("tmpfs", "ext4", "ext3", "ext2") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about XFS ? XFS is the recommended FS for GlusterFS.
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue |
Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
…unter-scope"" This reverts commit 402116a.
…unter-scope"" This reverts commit 402116a.
…unter-scope"" This reverts commit 402116a.
Automatic merge from submit-queue Make GCI nodes mount non tmpfs, ext* & bind mounts using an external mounter This PR downloads the stage1 & gci-mounter ACIs as part of cluster bring up instead of downloading them dynamically from gcr.io, which was the cause for #36206. I have also optimized the containerized mounter to pre-load the mounter image once to avoid fetch latency while using it. Original PR which got reverted: #35821 ```release-note GCI nodes use an external mounter script to mount NFS & GlusterFS storage volumes ``` @mtaufen Node e2e is not re-enabled in this PR. cc @jingxu97
…unter-scope"" This reverts commit 402116a.
Automatic merge from submit-queue Make GCI nodes mount non tmpfs, ext* & bind mounts using an external mounter This PR downloads the stage1 & gci-mounter ACIs as part of cluster bring up instead of downloading them dynamically from gcr.io, which was the cause for #36206. I have also optimized the containerized mounter to pre-load the mounter image once to avoid fetch latency while using it. Original PR which got reverted: kubernetes/kubernetes#35821 ```release-note GCI nodes use an external mounter script to mount NFS & GlusterFS storage volumes ``` @mtaufen Node e2e is not re-enabled in this PR. cc @jingxu97
Automatic merge from submit-queue Make GCI nodes mount non tmpfs, ext* & bind mounts using an external mounter This PR downloads the stage1 & gci-mounter ACIs as part of cluster bring up instead of downloading them dynamically from gcr.io, which was the cause for #36206. I have also optimized the containerized mounter to pre-load the mounter image once to avoid fetch latency while using it. Original PR which got reverted: kubernetes/kubernetes#35821 ```release-note GCI nodes use an external mounter script to mount NFS & GlusterFS storage volumes ``` @mtaufen Node e2e is not re-enabled in this PR. cc @jingxu97
Automatic merge from submit-queue Make GCI nodes mount non tmpfs, ext* & bind mounts using an external mounter This PR downloads the stage1 & gci-mounter ACIs as part of cluster bring up instead of downloading them dynamically from gcr.io, which was the cause for #36206. I have also optimized the containerized mounter to pre-load the mounter image once to avoid fetch latency while using it. Original PR which got reverted: kubernetes/kubernetes#35821 ```release-note GCI nodes use an external mounter script to mount NFS & GlusterFS storage volumes ``` @mtaufen Node e2e is not re-enabled in this PR. cc @jingxu97
Automatic merge from submit-queue [Kubelet] Use the custom mounter script for Nfs and Glusterfs only This patch reduces the scope for the containerized mounter to NFS and GlusterFS on GCE + GCI clusters This patch also enabled the containerized mounter on GCI nodes Shepherding multiple PRs through the submit queue is painful. Hence I combined them into this PR. Please review each commit individually. cc @jingxu97 @saad-ali kubernetes#35652 has also been reverted as part of this PR
Revert "Merge pull request kubernetes#35821 from vishh/gci-mounter-scope"
…unter-scope"" This reverts commit 402116a.
This patch reduces the scope for the containerized mounter to NFS and GlusterFS on GCE + GCI clusters
This patch also enabled the containerized mounter on GCI nodes
Shepherding multiple PRs through the submit queue is painful. Hence I combined them into this PR. Please review each commit individually.
cc @jingxu97 @saad-ali
#35652 has also been reverted as part of this PR
This change is