Skip to content

Add newline character when writing offline to block device state #1659

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

Closed

Conversation

pwschuurman
Copy link
Contributor

@pwschuurman pwschuurman commented Apr 4, 2024

What type of PR is this?
/kind bug

What this PR does / why we need it:
This PR adds "\n" character to the disable device command (when writing to /sys/block/<devX>/device/state). Currently the command emits invalid argument (but the error is ignored).

Which issue(s) this PR fixes:
Fixes #1146

Special notes for your reviewer:

Without this fix, the prog.out in e2e test prints out:

W0404 01:22:27.876675   49081 node.go:460] Failed to disabled device /dev/disk/by-id/google-gcepd-csi-e2e-b3c295b8-24d2-4804-b363-385a66c7ffd0 (aka /dev/sdj) for volume projects/psch-gke-dev/zones/us-east4-c/disks/gcepd-csi-e2e-b3c295b8-24d2-4804-b363-385a66c7ffd0. Device may not be detached cleanly (ignored, unstaging continues): write /sys/block/sdj/device/state: invalid argument

Validated that with this fix, this warning is not printed.

Does this PR introduce a user-facing change?:

Bugfix: Correctly disable device by writing `offline`

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 4, 2024
@k8s-ci-robot k8s-ci-robot requested review from mattcary and tyuchn April 4, 2024 01:20
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 4, 2024
@pwschuurman
Copy link
Contributor Author

/retest

1 similar comment
@pwschuurman
Copy link
Contributor Author

/retest

@mattcary
Copy link
Contributor

mattcary commented Apr 4, 2024

Nice find!

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mattcary, pwschuurman

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:
  • OWNERS [mattcary,pwschuurman]

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

@pwschuurman
Copy link
Contributor Author

/retest

@k8s-ci-robot
Copy link
Contributor

@pwschuurman: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration 33bc37f link true /test pull-gcp-compute-persistent-disk-csi-driver-kubernetes-integration

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 1, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

@pwschuurman
Copy link
Contributor Author

Closing. We decided to remove the disable device logic in #1689

@pwschuurman pwschuurman closed this May 2, 2024
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. 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. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DisableDevice not working as expected
3 participants