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

Fix chown on distributed flex volumes (like gluster) #68680

Merged
merged 1 commit into from Sep 26, 2018

Conversation

@benoitf
Contributor

benoitf commented Sep 14, 2018

What this PR does / why we need it:
FlexVolume mount operation is performing by default the change of volume ownership when fsGroup is provided.

volume.SetVolumeOwnership(f, fsGroup)

The problem is that when performing that on distributed volumes like a gluster volume, when mounting the volume into a pod, there is big chown operation running on all files on this volume.
For example, as we may always get the same volume for the same user, k8s is trying to perform a lot of chown operations . If there are few files on the volume it’s immediate but with like 5K files, etc it takes a huge time

With the provided patch, the driver capability fsGroup:false would skip that.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #68137

Release note:

Provides FSGroup capability on FlexVolume driver. It allows to disable the VolumeOwnership operation when volume is mounted

/sig-storage

@gnufied

This comment has been minimized.

Show comment
Hide comment
@gnufied

gnufied Sep 14, 2018

Member

/ok-to-test

Member

gnufied commented Sep 14, 2018

/ok-to-test

@chakri-nelluri

One minor comment.

@k8s-ci-robot k8s-ci-robot added size/XS and removed size/S labels Sep 14, 2018

@benoitf

This comment has been minimized.

Show comment
Hide comment
@benoitf

benoitf Sep 14, 2018

Contributor

/retest

Contributor

benoitf commented Sep 14, 2018

/retest

@gnufied

This comment has been minimized.

Show comment
Hide comment
@gnufied

gnufied Sep 14, 2018

Member

Can you please add a release note to the PR?

Member

gnufied commented Sep 14, 2018

Can you please add a release note to the PR?

@benoitf

This comment has been minimized.

Show comment
Hide comment
@benoitf

benoitf Sep 14, 2018

Contributor

Yes. Could you run again tests. I fixed comment

Contributor

benoitf commented Sep 14, 2018

Yes. Could you run again tests. I fixed comment

@benoitf

This comment has been minimized.

Show comment
Hide comment
@benoitf

benoitf Sep 14, 2018

Contributor

@gnufied release notes added

Contributor

benoitf commented Sep 14, 2018

@gnufied release notes added

@neolit123

This comment has been minimized.

Show comment
Hide comment
@neolit123

neolit123 Sep 15, 2018

Member

/kind bug

Member

neolit123 commented Sep 15, 2018

/kind bug

@k8s-ci-robot k8s-ci-robot added kind/bug and removed needs-kind labels Sep 15, 2018

@gnufied

This comment has been minimized.

Show comment
Hide comment
@gnufied

gnufied Sep 17, 2018

Member

/lgtm

Member

gnufied commented Sep 17, 2018

/lgtm

@gnufied

This comment has been minimized.

Show comment
Hide comment
@gnufied

gnufied Sep 17, 2018

Member

putting this one hold. So as @chakri-nelluri can have a final look before it merges.

/hold

Member

gnufied commented Sep 17, 2018

putting this one hold. So as @chakri-nelluri can have a final look before it merges.

/hold

@childsb childsb modified the milestone: v1.12 Sep 17, 2018

@chakri-nelluri

This comment has been minimized.

Show comment
Hide comment
@chakri-nelluri

chakri-nelluri Sep 17, 2018

Contributor

/lgtm

Contributor

chakri-nelluri commented Sep 17, 2018

/lgtm

@chakri-nelluri

This comment has been minimized.

Show comment
Hide comment
@chakri-nelluri

chakri-nelluri Sep 17, 2018

Contributor

/hold cancel

Contributor

chakri-nelluri commented Sep 17, 2018

/hold cancel

@childsb

This comment has been minimized.

Show comment
Hide comment
@childsb

childsb Sep 21, 2018

Member

LGTM, but holding this for 1.13

Member

childsb commented Sep 21, 2018

LGTM, but holding this for 1.13

@k8s-ci-robot k8s-ci-robot removed the lgtm label Sep 25, 2018

@benoitf

This comment has been minimized.

Show comment
Hide comment
@benoitf

benoitf Sep 25, 2018

Contributor

FYI I rebased code due to conflicts after some other PRs have been merged

Contributor

benoitf commented Sep 25, 2018

FYI I rebased code due to conflicts after some other PRs have been merged

@gnufied

This comment has been minimized.

Show comment
Hide comment
@gnufied

gnufied Sep 25, 2018

Member

/lgtm

Member

gnufied commented Sep 25, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Sep 25, 2018

@k8s-ci-robot

This comment has been minimized.

Show comment
Hide comment
@k8s-ci-robot

k8s-ci-robot Sep 25, 2018

Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benoitf, chakri-nelluri, gnufied

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Contributor

k8s-ci-robot commented Sep 25, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benoitf, chakri-nelluri, gnufied

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@benoitf

This comment has been minimized.

Show comment
Hide comment
@benoitf

benoitf Sep 25, 2018

Contributor

/retest

Contributor

benoitf commented Sep 25, 2018

/retest

@k8s-ci-robot k8s-ci-robot merged commit c8f0af2 into kubernetes:master Sep 26, 2018

18 checks passed

cla/linuxfoundation benoitf authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-e2e-kubeadm-gce Skipped
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
tide In merge pool.
Details

@benoitf benoitf deleted the benoitf:fix-chown branch Sep 26, 2018

benoitf added a commit to benoitf/gluster-subvol that referenced this pull request Sep 27, 2018

Allow to skip fsGroup chown on kubernetes
With this patch it's possible to disable fsGroup
kubernetes/kubernetes#68680
it is also merged on OKD openshift/origin#21070 3.11.x

Fix gluster#23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment