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

Change default filestore permissions to 0700 #129214

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

tallclair
Copy link
Member

@tallclair tallclair commented Dec 13, 2024

What type of PR is this?

/kind bug

What this PR does / why we need it:

Change the default directory permissions used by pkg/kubelet/util/store/filestore.go from 0755 to 0700. This utility is only used for storing Kubelet state, through either checkpoint_manager or usersns_manager, so there don't need to be any other readers.

This change is mainly to protect windows kubelets, which perform chmod on the target directory of MkdirAll, whether or not it's created (

err = Chmod(path, perm)
). Since the root kubelet directory is used for some checkpoints, this caused the root kubelet directory permissions to change on windows (which led to in-place resize being rolled back). We should probably fix this issue on Windows, but changing the default filestore permissions is an easy short-term fix.

Fixes #128897

Does this PR introduce a user-facing change?

NONE

/sig node
/priority important-soon
/milestone v1.33

@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Dec 13, 2024
@k8s-ci-robot k8s-ci-robot added this to the v1.33 milestone Dec 13, 2024
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/bug Categorizes issue or PR as related to a bug. sig/node Categorizes an issue or PR as relevant to SIG Node. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 13, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tallclair

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2024
@tallclair
Copy link
Member Author

/assign @haircommander @marosset

@tallclair
Copy link
Member Author

/cc @SergeyKanzhelev @mrunalp

@tallclair
Copy link
Member Author

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 13, 2024
@haircommander
Copy link
Contributor

/lgtm

makes sense to me!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9868de823b299d68ffed6214792119b9948230ab

@haircommander
Copy link
Contributor

@ffromani can you think of any risks here?

@sftim
Copy link
Contributor

sftim commented Dec 13, 2024

Are we sure this change isn't visible to cluster admins? If it is, we should changelog it.

@tallclair
Copy link
Member Author

Missed a case in my original analysis of this: #129217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
5 participants