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

fix(create): validate create volume request access mode #109

Merged
merged 2 commits into from
Aug 6, 2020

Conversation

prateekpandey14
Copy link
Contributor

@prateekpandey14 prateekpandey14 commented Aug 5, 2020

Signed-off-by: prateekpandey14 [email protected]

What this PR does:
Commits adds the validation to validate the create volume request access mode and support only single node writer
i.e. ReadWriteOnce accessmode and failed for other unsupported modes, like ReadWriteMany

  • Tested the changes using a ReadWriteMany accessmode PVC and verify the error.
kubectl describe pvc
Name:          claim-csi-123
Namespace:     default
StorageClass:  cstor-sparse-auto
Status:        Pending
Volume:        
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner: cstor.csi.openebs.io
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:      
Access Modes:  
VolumeMode:    Filesystem
Mounted By:    <none>
Events:
  Type     Reason                Age                   From                                                                                      Message
  ----     ------                ----                  ----                                                                                      -------
  Normal   ExternalProvisioning  3m38s (x62 over 18m)  persistentvolume-controller                                                               waiting for a volume to be created, either by external provisioner "cstor.csi.openebs.io" or manually created by system administrator
  Normal   Provisioning          17s (x12 over 18m)    cstor.csi.openebs.io_openebs-cstor-csi-controller-0_e3f45483-77c5-45e5-bb1a-ee9abc85a70b  External provisioner is provisioning volume for claim "default/claim-csi-123"
  Warning  ProvisioningFailed    17s (x12 over 18m)    cstor.csi.openebs.io_openebs-cstor-csi-controller-0_e3f45483-77c5-45e5-bb1a-ee9abc85a70b  failed to provision volume with StorageClass "cstor-sparse-auto": rpc error: code = InvalidArgument desc = unsupported access mode: MULTI_NODE_MULTI_WRITER

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Checklist

  • PR messages has document related information
  • Labelled this PR & related issue with documentation tag
  • PR messages has breaking changes related information
  • PR messages has upgrade related information
  • Labelled this PR & related issue with requires-upgrade tag
  • Tests updated

Commits adds the validation to validate the create volume
request access mode to validate and support only single node writer
i.e. `ReadWriteOnce` accessmode and failed for other unsupported
modes, like `ReadWriteMany`

Signed-off-by: prateekpandey14 <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2020

Codecov Report

Merging #109 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   63.88%   63.88%           
=======================================
  Files           7        7           
  Lines         335      335           
=======================================
  Hits          214      214           
  Misses        108      108           
  Partials       13       13           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1c97e9a...3526e7b. Read the comment docs.

Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

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

provided comments related to the error message. Rest of changes are good

pkg/driver/controller_utils.go Outdated Show resolved Hide resolved
Signed-off-by: prateekpandey14 <[email protected]>
Copy link

@mittachaitu mittachaitu left a comment

Choose a reason for hiding this comment

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

Changes are good

@kmova kmova merged commit fa25f06 into openebs-archive:master Aug 6, 2020
prateekpandey14 added a commit to prateekpandey14/cstor-csi that referenced this pull request Aug 6, 2020
…ive#109)

Commits adds the validation to validate the create volume
request access mode to validate and support only single node writer
i.e. `ReadWriteOnce` accessmode and failed for other unsupported
modes, like `ReadWriteMany`


Signed-off-by: prateekpandey14 <[email protected]>
prateekpandey14 added a commit to prateekpandey14/cstor-csi that referenced this pull request Aug 6, 2020
…ive#109)

Commits adds the validation to validate the create volume
request access mode to validate and support only single node writer
i.e. `ReadWriteOnce` accessmode and failed for other unsupported
modes, like `ReadWriteMany`


Signed-off-by: prateekpandey14 <[email protected]>
mittachaitu pushed a commit to mittachaitu/cstor-csi that referenced this pull request Aug 10, 2020
…ive#109)

Commits adds the validation to validate the create volume
request access mode to validate and support only single node writer
i.e. `ReadWriteOnce` accessmode and failed for other unsupported
modes, like `ReadWriteMany`


Signed-off-by: prateekpandey14 <[email protected]>
mittachaitu pushed a commit to mittachaitu/cstor-csi that referenced this pull request Aug 13, 2020
…ive#109)

Commits adds the validation to validate the create volume
request access mode to validate and support only single node writer
i.e. `ReadWriteOnce` accessmode and failed for other unsupported
modes, like `ReadWriteMany`


Signed-off-by: prateekpandey14 <[email protected]>
prateekpandey14 added a commit that referenced this pull request Aug 13, 2020
Commits adds the validation to validate the create volume
request access mode to validate and support only single node writer
i.e. `ReadWriteOnce` accessmode and failed for other unsupported
modes, like `ReadWriteMany`


Signed-off-by: prateekpandey14 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants