Skip to content

Fix #128 - Cannot attach raw block volumes#129

Merged
k8s-ci-robot merged 1 commit intokubernetes-csi:masterfrom
Akrog:fix-block-attach
Mar 5, 2019
Merged

Fix #128 - Cannot attach raw block volumes#129
k8s-ci-robot merged 1 commit intokubernetes-csi:masterfrom
Akrog:fix-block-attach

Conversation

@Akrog
Copy link
Copy Markdown
Contributor

@Akrog Akrog commented Mar 5, 2019

CSI has supported raw block volumes since version 0.1, and Kubernetes
since v1.9, but the external-attacher cannot attach a block volume.

When attaching a raw block volume we don't even see an error on the
external-attacher logs saying it cannot handle it, it just goes ahead
assuming it's a mount type of volume.

This patch checks the volume mode on the spec to see if it's a raw
volume or not.

The the volume mode is define and it's PVBlock we'll use the Block
access type, in any other case (undefined and Filesystem mode) we'll use
the Mount access type.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 5, 2019
@k8s-ci-robot k8s-ci-robot requested review from lpabon and saad-ali March 5, 2019 12:21
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 5, 2019
CSI has supported raw block volumes since version 0.1, and Kubernetes
since v1.9, but the external-attacher cannot attach a block volume.

When attaching a raw block volume we don't even see an error on the
external-attacher logs saying it cannot handle it, it just goes ahead
assuming it's a mount type of volume.

This patch checks the volume mode on the spec to see if it's a raw
volume or not.

The the volume mode is define and it's PVBlock we'll use the Block
access type, in any other case (undefined and Filesystem mode) we'll use
the Mount access type.
@Akrog Akrog force-pushed the fix-block-attach branch from 63d47d2 to a525eb9 Compare March 5, 2019 13:20
@jsafrane
Copy link
Copy Markdown
Contributor

jsafrane commented Mar 5, 2019

/lgtm
/approve

Thanks for the PR!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 5, 2019
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Akrog, jsafrane

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

The pull request process is described here

Details 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 Mar 5, 2019
@k8s-ci-robot k8s-ci-robot merged commit 6dd3aae into kubernetes-csi:master Mar 5, 2019
@Akrog
Copy link
Copy Markdown
Contributor Author

Akrog commented Mar 5, 2019

Thanks for the quick review!

@Akrog Akrog deleted the fix-block-attach branch March 5, 2019 14:25
@msau42
Copy link
Copy Markdown
Collaborator

msau42 commented Mar 5, 2019

Maybe CSI sanity also needs a test case for this to ensure that volume plugins are correctly checking capabilities cc @bswartz

Akrog added a commit to Akrog/ember-csi that referenced this pull request Mar 8, 2019
This patch adds raw block volume PVCs and Pods to the Kubernetes with
CSI v1 example.

We will be using our own external attacher since the one upstream
doesn't currently support raw block volume attachs.

Issue: kubernetes-csi/external-attacher#128
PR: kubernetes-csi/external-attacher#129
pohly added a commit to pohly/external-attacher that referenced this pull request Feb 3, 2021
7bc70e52 Merge pull request kubernetes-csi#129 from pohly/squash-documentation
e0b02e72 README.md: document usage of --squash
316cb957 Merge pull request kubernetes-csi#132 from yiyang5055/bugfix/boilerplate
26e2ab10 fix: default boilerplate path
1add8c18 Merge pull request kubernetes-csi#133 from pohly/kubernetes-1.20-tag
3e811d6c prow.sh: fix "on-master" prow jobs

git-subtree-dir: release-tools
git-subtree-split: 7bc70e5264a5ce5f47780bdbc6c7b7f4e79243fa
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants