Bug 1462086

Summary: Binding Serviceclass on overview is always keep in loading
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED NOTABUG QA Contact: XiaochuanWang <xiaocwan>
Severity: low Docs Contact:
Priority: medium    
Version: 3.6.0CC: aos-bugs, decarr, jokerman, mmccomas, pmorie, spadgett, wsun, xiaocwan
Target Milestone: ---   
Target Release: ---   
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: 2019-06-04 20:41:29 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:
Attachments:
Description Flags
binding icon is keep loading none

Description XiaochuanWang 2017-06-16 07:23:18 UTC
Created attachment 1288271 [details]
binding icon is keep loading

Description of problem:
When service catalog is deployed but broker is not created, Create an app and a serviceclass, bind the app to serviceclass from overview,  the icon is always loading, but the Binding is actually created.

Version-Release number of selected component (if applicable):
openshift v3.6.112

How reproducible:
Always

Steps to Reproduce:
1. Use latest kubectl create serviceclass
apiVersion: servicecatalog.k8s.io/v1alpha1
bindable: true
brokerName: ups-broker
description: A user provided service
externalID: 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2467
externalMetadata: null
kind: ServiceClass
metadata:
  name: mycat-database
  resourceVersion: "1"
planUpdatable: false
plans:
- description: Sample plan description
  externalID: 86064792-7ea2-467b-af93-ac9694d96d51
  externalMetadata: null
  free: true
  name: default
alphaTags:
  - mycat
  - database
2. Create an app for a project, like Perl
3. On service catalog UI console, select the serviceclass "myserviceclass" and choose the project. 
4. Choose "Bind to an application" and select "myperl"
5. # kubectl get binding -n xiaocwan-t --context=service-catalog (to use latest cli)
NAME                         KIND
mycat-database-mrbwv-9hd5k   Binding.v1alpha1.servicecatalog.k8s.io


Actual results:
4. Icon is always keep in loading, but the Binding is actually created (binding is pending), please see the screenshot

Expected results:
4. The Icon should not always be loading


Additional info:

Comment 1 Jessica Forrester 2017-06-16 14:34:55 UTC
1) Binding is a potentially long-lived asynchronous operation, the binding object will be created, but the binding is not yet ready / the credentials are not yet available. This is why it remains in a pending state. If you look at the binding object the conditions on it will show its not ready yet. We can consider changing the terminology from Pending to "Not ready" or something similar, but that is not a blocking issue so I am lowering the severity.

2) You should never in any valid environment create a service class directly without a backing broker. If you create the Broker it is the service catalog's responsibility to ask the broker what services it has and the catalog will create the service classes. I will talk to the service catalog folks and see if there is anything they can do to prevent this. But either way that is a separate issue.

Comment 2 Derek Carr 2017-06-16 14:42:17 UTC
Paul - ensure that when we create our roles that only the catalog is privileged to create service classes to avoid users attempting to do it directly.

Comment 3 Derek Carr 2017-06-16 14:49:08 UTC
xref https://github.com/openshift/origin/issues/14703

Comment 4 Paul Morie 2017-06-19 16:16:57 UTC
How was the catalog deployed in this case?  The rolebindings in the current installer PR will not allow ordinary users to create or update serviceclasses.

Comment 5 XiaochuanWang 2017-06-26 03:17:25 UTC
This is a negative scenario, when user create a binding without broker, the status icon is always Running and it looks like the binding is being created all the time.

The understanding is right:
https://github.com/openshift/origin/issues/14703#issuecomment-309507064

Comment 6 Jessica Forrester 2017-06-26 12:23:27 UTC
The binding staying in "Pending" (or "Not Ready" if we change the terminology) is correct.  The binding object has been created but is not ready yet.  From the console's perspective this is the appropriate way to display this state.  Leaving this open for the moment until we decide if we are changing the terminology to "Not Ready".

Comment 7 Samuel Padgett 2019-06-04 20:41:29 UTC
This is working as intended and not a bug. We do not plan to change this behavior.