Bug 2043035 - Wrong error code provided when request contains invalid argument
Summary: Wrong error code provided when request contains invalid argument
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.10
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.11.0
Assignee: Vojtech Juranek
QA Contact: michal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-20 14:14 UTC by Vojtech Juranek
Modified: 2022-08-10 10:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:43:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ovirt-csi-driver pull 101 0 None open Bug 2043035: use proper error code 2022-01-20 15:19:45 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:43:25 UTC

Description Vojtech Juranek 2022-01-20 14:14:07 UTC
Description of problem:

When user requests PVC with unsupported access mode (see BZ #1882983), exception without any error code is thrown. However, CSI specification requires to return gRPC error code INVALID_ARGUMENT:

    Invalid or unsupported field in the request 	3 INVALID_ARGUMENT 	Indicates that the one or more fields in this field is either not allowed by the Plugin or has an invalid value. More human-readable information MAY be provided in the gRPC status.message field.


Steps to Reproduce:
See reproducer in BZ #1882983 and check error returned by the plugin in the controller log.

Comment 3 michal 2022-02-15 12:22:02 UTC
ocp: 4.11.0-0.nightly-2022-02-10-031822
1) create pvc with Access mode - ReadWriteMany
2) look on log of pod controller - 'oc logs -c csi-provisioner  pod/ovirt-csi-driver-controller-767f5bf5c8-cmplq'
excpected error appear:
 
I0215 10:06:30.390817       1 event.go:285] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"openshift-cluster-csi-drivers", Name:"pv-claim", UID:"fcd8f59d-286b-4f93-9c6e-7e596f52c653", APIVersion:"v1", ResourceVersion:"2653170", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "ovirt-csi-sc": rpc error: code = InvalidArgument desc = unsupported access mode MULTI_NODE_MULTI_WRITER, currently only RWO is supported

and pvc is stuck on pending state  (this is the correct behavier)

Comment 6 errata-xmlrpc 2022-08-10 10:43:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069


Note You need to log in before you can comment on or make changes to this bug.