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
Skip resize if fs is readonly #114325
Skip resize if fs is readonly #114325
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Dec 6 21:54:24 UTC 2022. |
@judemars: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @judemars. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
/assign saikat-royc |
/ok-to-test |
/retest |
/assign @xing-yang |
/lgtm |
/retest |
output, err := resizefs.exec.Command(blockDev, "--getro", devicePath).CombinedOutput() | ||
outStr := strings.TrimSpace(string(output)) | ||
if err != nil { | ||
return false, fmt.Errorf("failed to read size of device %s: %s: %s", devicePath, err, outStr) |
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.
nit: should the log here be failed to get read-only ....
or something similar?
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.
Woops, fixed. Thank you!
/approve |
ahh looks like I don't have approval power |
I will approve but although a nit, it would be good to have log message fixed. |
/label tide/merge-method-squash |
@leiyiz I set the merge method to squash, I think it's easier that way in case of last minute changes |
/retest |
/lgtm |
/assign @jsafrane |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gnufied, jsafrane, judemars, leiyiz 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 |
* skip resize if fs is readonly * run formatter + add log line for early return case * fix error
What type of PR is this?
/kind bug
What this PR does / why we need it:
See kubernetes-sigs/gcp-compute-persistent-disk-csi-driver#1088. Right now we attempt a filesystem resize without checking whether it's readonly. This change checks the readonly bit of the filesystem, and skips resizing if it is set to "1".
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: