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

[Kubelet] Use the custom mounter script for Nfs and Glusterfs only #35821

Merged
merged 4 commits into from
Nov 3, 2016

Conversation

vishh
Copy link
Contributor

@vishh vishh commented Oct 28, 2016

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 Reviewable

@vishh vishh added priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. labels Oct 28, 2016
@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 28, 2016
@k8s-github-robot k8s-github-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 28, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins unit/integration failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history.

The magic incantation to run this job again is @k8s-bot unit test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE Node e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history.

The magic incantation to run this job again is @k8s-bot node e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins Kubemark GCE e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history.

The magic incantation to run this job again is @k8s-bot kubemark e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history.

The magic incantation to run this job again is @k8s-bot cvm gce e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-ci-robot
Copy link
Contributor

Jenkins GCE etcd3 e2e failed for commit f2f538c6956d3f9721aec1df4c297ea988c9573b. Full PR test history.

The magic incantation to run this job again is @k8s-bot gce etcd3 e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@vishh vishh force-pushed the gci-mounter-scope branch 2 times, most recently from bfc1ee6 to 0baf799 Compare October 28, 2016 22:41
@vishh vishh changed the title [Kubelet] Do not use custom mounter script for bind mounts, ext* and tmpfs mounts [Kubelet] Use the custom mounter script for Nfs and Glusterfs only Oct 28, 2016
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"
Copy link
Contributor

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?

Copy link
Contributor Author

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") {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

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...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#35821 (comment)

I don't like it either. It is the solution of choice currently for the goog storage team.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 29, 2016
@vishh
Copy link
Contributor Author

vishh commented Oct 31, 2016

@jingxu97 rebased

@vishh
Copy link
Contributor Author

vishh commented Oct 31, 2016

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.
cc @jingxu97 @matchstick @saad-ali

@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2016
@vishh vishh force-pushed the gci-mounter-scope branch 2 times, most recently from d985de2 to 31ec6ac Compare October 31, 2016 15:43
@@ -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 */)
Copy link
Member

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") {
Copy link
Member

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...

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 31, 2016
@k8s-ci-robot
Copy link
Contributor

Jenkins verification failed for commit 31ec6ac. Full PR test history.

The magic incantation to run this job again is @k8s-bot verify test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2016
@vishh
Copy link
Contributor Author

vishh commented Nov 2, 2016

As per @jingxu97's offline message, I'm marking this PR LGTM since all the open comments have been addressed.

@vishh vishh added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2016
@vishh vishh added this to the v1.5 milestone Nov 2, 2016
}
// 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")
Copy link
Contributor

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-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 973fa6b into kubernetes:master Nov 3, 2016
saad-ali added a commit to saad-ali/kubernetes that referenced this pull request Nov 4, 2016
…ope"

This reverts commit 973fa6b, reversing
changes made to 41b5fe8.
saad-ali added a commit that referenced this pull request Nov 4, 2016
Revert "Merge pull request #35821 from vishh/gci-mounter-scope"
vishh added a commit to vishh/kubernetes that referenced this pull request Nov 4, 2016
jingxu97 pushed a commit to jingxu97/kubernetes that referenced this pull request Nov 8, 2016
vishh added a commit to vishh/kubernetes that referenced this pull request Nov 8, 2016
k8s-github-robot pushed a commit that referenced this pull request Nov 9, 2016
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
jingxu97 pushed a commit to jingxu97/kubernetes that referenced this pull request Nov 21, 2016
dims pushed a commit to dims/openstack-cloud-controller-manager that referenced this pull request Mar 24, 2017
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
dims pushed a commit to dims/openstack-cloud-controller-manager that referenced this pull request Sep 6, 2017
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
dims pushed a commit to dims/openstack-cloud-controller-manager that referenced this pull request Jan 13, 2018
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
dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
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
dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
…ope"

This reverts commit 973fa6b, reversing
changes made to 41b5fe8.
dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
Revert "Merge pull request kubernetes#35821 from vishh/gci-mounter-scope"
dims pushed a commit to dims/kubernetes that referenced this pull request Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants