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

Feature: Multi-Attach for io2 block devices #1799

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

torredil
Copy link
Member

@torredil torredil commented Oct 25, 2023

Is this a bug fix or adding new feature?

What is this PR about? / Why do we need it?

This PR implements the ability to enable multi-attach for io2 block devices by specifying the ReadWriteMany access mode in PersistentVolumeClaim.spec.accessModes. A few important points to note:

  • EBS Multi-Attach does not support standard file systems. Standard file systems such as xfs, ext3, ext4, and NTFS aren't designed to be simultaneously accessed by multiple EC2 instances.
  • Simultaneous access to a standard file system can result in data corruption or data loss.
  • Multi-Attach is only enabled for io2 block devices.

See the documentation: https://github.com/torredil/aws-ebs-csi-driver/blob/d316ff830997cb38d17e38625cbaeea2e089068a/docs/multi-attach.md

What testing is done?

  • Unit tests: make test
  • e2e tests:
$ ginkgo run --focus='multi-attach' --v&

Ran 3 of 42 Specs in 82.685 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 39 Skipped
  • External.Storage suite

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 25, 2023
@torredil torredil force-pushed the multi-attach-7123 branch 2 times, most recently from f109d19 to 5918d0b Compare October 25, 2023 13:10
docs/multi-attach.md Show resolved Hide resolved
docs/multi-attach.md Outdated Show resolved Hide resolved
docs/multi-attach.md Show resolved Hide resolved
pkg/cloud/cloud.go Outdated Show resolved Hide resolved
tests/e2e/multi_attach.go Outdated Show resolved Hide resolved
pkg/cloud/cloud.go Outdated Show resolved Hide resolved
Copy link
Contributor

@wmesard wmesard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need some static provisioning test cases.

  • If multi-attach is not enabled on an existing volume, obviously mult-attach should fail. So we should have an expected-fail test.
  • For this release, I believe that we are only intending to support multi-attach in dynamically provisioned volumes. If that's true, then we should enforce that, and have a test for that enforcement. If we decide that we'll handle the case where a statically provisioned volume has multi-attach enabled, then we should have an expected-success test for that.

docs/multi-attach.md Outdated Show resolved Hide resolved
docs/multi-attach.md Show resolved Hide resolved
pkg/cloud/cloud.go Show resolved Hide resolved
pkg/cloud/cloud.go Show resolved Hide resolved
pkg/cloud/cloud.go Show resolved Hide resolved
pkg/driver/controller.go Outdated Show resolved Hide resolved
tests/e2e/multi_attach.go Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

@wmesard: changing LGTM is restricted to collaborators

In response to this:

I think we need some static provisioning test cases.

  • If multi-attach is not enabled on an existing volume, obviously mult-attach should fail. So we should have an expected-fail test.
  • For this release, I believe that we are only intending to support multi-attach in dynamically provisioned volumes. If that's true, then we should enforce that, and have a test for that enforcement. If we decide that we'll handle the case where a statically provisioned volume has multi-attach enabled, then we should have an expected-success test for that.

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.

@torredil torredil force-pushed the multi-attach-7123 branch 7 times, most recently from 337e89a to b84d4ec Compare October 30, 2023 20:20
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 30, 2023
@torredil torredil force-pushed the multi-attach-7123 branch 5 times, most recently from 0eb06fe to 222c4c3 Compare October 31, 2023 15:53
@torredil
Copy link
Member Author

CI is green and this PR is now ready for another round in the ring : )

cc: @wmesard @ConnorJC3 @AndrewSirenko

@k8s-ci-robot
Copy link
Contributor

@wmesard: changing LGTM is restricted to collaborators

In response to this:

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.

pkg/cloud/cloud.go Show resolved Hide resolved
pkg/driver/internal/inflight.go Outdated Show resolved Hide resolved
pkg/driver/node.go Outdated Show resolved Hide resolved
pkg/cloud/cloud.go Outdated Show resolved Hide resolved
@ConnorJC3
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 6, 2023
@AndrewSirenko
Copy link
Contributor

/lgtm

@torredil
Copy link
Member Author

torredil commented Nov 7, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: torredil

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 Nov 7, 2023
@k8s-ci-robot k8s-ci-robot merged commit 27d1a99 into kubernetes-sigs:master Nov 7, 2023
18 checks passed
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSI support attach a volume to multiple instances with amazon EBS Multi-Attach
5 participants