Bug 2002602

Summary: Storageclass creation page goes blank when "Enable encryption" is clicked if there is a syntax error in the configmap
Product: OpenShift Container Platform Reporter: Rachael <rgeorge>
Component: Console Storage PluginAssignee: Divyansh Kamboj <dkamboj>
Status: CLOSED ERRATA QA Contact: Amrita Mahapatra <ammahapa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.9CC: aos-bugs, jefbrown, madam, nthomas, ocs-bugs, skatiyar
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 10:37:25 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 Rachael 2021-09-09 10:37:34 UTC
Description of problem (please be detailed as possible and provide log
snippets):

If there is a syntax error in the csi-kms-connection-details configmap, for eg: a missing comma as shown below, 

$ oc get cm csi-kms-connection-details -n openshift-storage -o yaml
apiVersion: v1
data:
  vault-tenant-sa-auth: |-
    {
      "encryptionKMSType": "vaulttenantsa",
      "vaultAddress": "https://vault.ocs.com:8200",
      "vaultBackendPath": "test-sa"
      "vaultCAVerify": "false"
    }

in the storage class creation page, on clicking the "Enable Encryption" checkbox the whole screen goes blank. This could be because the UI is unable to parse the configmap to populate the KMS connection details section in the UI.


Version of all relevant components (if applicable):
===================================================
OCP: 4.9.0-0.nightly-2021-09-08-233235
ODF: odf-operator.v4.9.0-125.ci


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
No

Is there any workaround available to the best of your knowledge?
Yes, correct the syntax error in the configmap

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
2

Can this issue reproducible?
Yes

Can this issue reproduce from the UI?
Yes

If this is a regression, please provide more details to justify this:
No


Steps to Reproduce:
===================

1. Edit/create the csi-kms-connection-details configmap in the openshift-storage namespace with the following config:

$ cat csi-kms-connection-details.yaml 
apiVersion: v1
kind: ConfigMap
data:
  vault-tenant-sa-auth: |-
    {
      "encryptionKMSType": "vaulttenantsa",
      "vaultAddress": "https://vault.ocs.com:8200",
      "vaultBackendPath": "test-sa"
      "vaultCAVerify": "false"
    }
metadata:
  name: csi-kms-connection-details

2. In the UI, navigate to storageclass creation page: Storage -> Storageclasses -> Create newstorageclass

3. Enter the name of the storageclass, select provisioner "openshift-storage.rbd.csi.ceph.com"

4. Click on the "Enable Encryption" checkbox


Actual results:
===============

The screen goes blank when as soon as the "Enable Encryption" checkbox is clicked

Expected results:
=================

Instead of the screen going blank, an error message pointing to the cause of the issue would be a better user experience

Comment 10 errata-xmlrpc 2022-08-10 10:37:25 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