Bug 1928640

Summary: Definite error message when using StorageClass based on azure-file / Premium_LRS
Product: OpenShift Container Platform Reporter: Priyanka Kanthale <pkanthal>
Component: StorageAssignee: Christian Huffman <chuffman>
Storage sub component: Kubernetes QA Contact: Qin Ping <piqin>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, chuffman, jsafrane
Version: 4.6Flags: pkanthal: needinfo-
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:44:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Priyanka Kanthale 2021-02-15 09:11:39 UTC
Description of problem:

When trying to create a PVC using the following StorageClass 

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: azure-file-premium
  selfLink: /apis/storage.k8s.io/v1/storageclasses/azure-file-premium
  uid: xxxxx
  resourceVersion: '66575996'
  creationTimestamp: '2021-01-13T07:35:15Z'
provisioner: kubernetes.io/azure-file
parameters:
  skuName: Premium_LRS
reclaimPolicy: Delete
mountOptions:
  - uid=1500
  - gid=1500
  - mfsymlinks
volumeBindingMode: Immediate
 
The following error occurred: 
 
Create: Failure responding to request: StatusCode=400 – Original Error: autorest/azure: Service returned an error.
Status=400 Code='InvalidHeaderValue' Message='The value for one of the HTTP headers is not in the correct

The error is due to the minimum size of 100gi min requirement.

Actual results: The error is erroneous and does not correctly point to the issue.  

Expected results: error message should be more reasonable

Additional Information: https://github.com/Azure/AKS/issues/1516

Comment 1 Christian Huffman 2021-02-16 16:42:47 UTC
I tested [1], and it addresses the issue reported in this BZ. In addition, note that the Azure File CSI driver currently works as expected (updating the requested size to 100 GB if it's less). An upstream PR [1] has been submitted, and we'll backport it once it is merged there.

[1] https://github.com/kubernetes/kubernetes/pull/99122

Comment 2 Christian Huffman 2021-02-18 15:33:58 UTC
The upstream PR has been merged. Submitted [1] to backport this change.

[1] https://github.com/openshift/kubernetes/pull/577

Comment 5 Christian Huffman 2021-04-09 19:46:29 UTC
The changes have been included in openshift/kubernetes as of [1]. Sending to QE to confirm the changes are present.

[1] https://github.com/openshift/kubernetes/tree/8d804287d34080630cbe420032ff8e7e74271724

Comment 7 Qin Ping 2021-04-12 08:29:55 UTC
Verified with: 4.8.0-0.nightly-2021-04-09-222447

If the PVC claims storage from premium azure file and if the storage.capacity is smaller than 100Gi, then a 100Gi PVC will be created.

Comment 10 errata-xmlrpc 2021-07-27 22:44:28 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 (Moderate: OpenShift Container Platform 4.8.2 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-2021:2438