Bug 1834662

Summary: [aws-ebs-csi-driver-operator] Prevent aws ebs csi driver is deployed on other cloud platforms early
Product: OpenShift Container Platform Reporter: Qin Ping <piqin>
Component: StorageAssignee: Fabio Bertinatto <fbertina>
Status: CLOSED ERRATA QA Contact: Qin Ping <piqin>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, jsafrane
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:37:39 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 Qin Ping 2020-05-12 07:17:01 UTC
Description of problem:
Now we can deploy aws ebs csi driver operator successfully in other cloud platforms, such as Azure, when we install aws ebs csi driver with the operator, it will fail.

Version-Release number of selected component (if applicable):
aws-ebs-csi-driver-operator version 554623c-554623c765661f1b4b1a488441424307c5759df9


How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
the operator can be installed successfully.
$ oc get csv -n openshift-aws-ebs-csi-driver-operator
NAME                                 DISPLAY                VERSION   REPLACES   PHASE
aws-ebs-csi-driver-operator.v4.5.0   AWS EBS CSI Operator   4.5.0                Succeeded

deploy driver failed.

$ oc describe deployment -n openshift-aws-ebs-csi-driver-operator
Normal   CredentialsRequestCreated  18m                   aws-ebs-csi-driver-operator                                                      Created CredentialsRequest.cloudcredential.openshift.io/openshift-aws-ebs-csi-driver -n openshift-cloud-credential-operator because it was missing
  Normal   SyncError                  3m7s (x364 over 18m)  aws-ebs-csi-driver-operator                                                      Error syncing CSI driver: waiting for cloud credentials secret provided by cloud-credential-operator

$ oc describe CredentialsRequest openshift-aws-ebs-csi-driver -n openshift-cloud-credential-operator
Status:
  Conditions:
    Last Probe Time:       2020-05-12T06:54:42Z
    Last Transition Time:  2020-05-12T06:54:42Z
    Message:               CredentialsRequest is not for platform Azure
    Reason:                InfrastructureMismatch
    Status:                True
    Type:                  Ignored
  Last Sync Generation:    0
  Provisioned:             false
Events:                    <none>



Expected results:
If we can block the deployment for ebs csi driver operator and report a clear failed log.

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

Comment 3 Qin Ping 2020-05-27 13:18:23 UTC
Verified with: aws-ebs-csi-driver-operator version 554623c-554623c765661f1b4b1a488441424307c5759df9

$ oc get awsebsdriver cluster -ojson|jq .status
{
  "conditions": [
    {
      "lastTransitionTime": "2020-05-27T13:16:06Z",
      "message": "AWS EBS CSI driver requires an AWS cluster.",
      "reason": "UnsupportedPlatform",
      "status": "False",
      "type": "Progressing"
    },
    {
      "lastTransitionTime": "2020-05-27T13:16:06Z",
      "message": "AWS EBS CSI driver requires an AWS cluster.",
      "reason": "UnsupportedPlatform",
      "status": "False",
      "type": "PrereqsSatisfied"
    },
    {
      "lastTransitionTime": "2020-05-27T13:16:06Z",
      "message": "platform \"Azure\" is not supported by the AWS EBS CSI driver",
      "reason": "OperatorSync",
      "status": "True",
      "type": "Degraded"
    },
    {
      "lastTransitionTime": "2020-05-27T13:16:06Z",
      "status": "False",
      "type": "ManagementStateDegraded"
    }
  ],
  "readyReplicas": 0
}

Comment 4 errata-xmlrpc 2020-07-13 17:37:39 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, 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/RHBA-2020:2409