Bug 1577058

Summary: [svcat] svcat unbind command should support remove muiti bindings
Product: OpenShift Container Platform Reporter: sunzhaohua <zhsun>
Component: Service CatalogAssignee: Marko Luksa <mluksa>
Status: CLOSED ERRATA QA Contact: Jian Zhang <jiazha>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: chezhang, jaboyd, jiazha, mluksa, zhsun
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:19:10 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 sunzhaohua 2018-05-11 06:31:01 UTC
Description of problem:
try to remove muiti bindings, only one binding removed.


Version-Release number of selected component (if applicable):
client: v3.10.0-0.38.0;Upstream:v0.1.16
server: v1.10.0+b81c8f8

How reproducible:
Always

Steps to Reproduce:
1. provision an instance with multi bindings
2. svcat unbind -n szh-project --name ups-instance3  --name ups-instance3-bind3
3.

Actual results:
only one binding is removed.

# svcat unbind -n szh-project --name ups-instance3  --name ups-instance3-bind3
deleted ups-instance3-bind3

# svcat describe instances ups-instance3
  Name:        ups-instance3                                                                      
  Namespace:   szh-project                                                                        
  Status:      Ready - The instance was provisioned successfully @ 2018-05-11 05:38:56 +0000 UTC  
  Class:       user-provided-service                                                              
  Plan:        default                                                                            

Parameters:
  {}

Bindings:
         NAME           STATUS  
+---------------------+--------+
  ups-instance3         Ready   
  ups-instance3-bind1   Ready   
  ups-instance3-bind2   Ready 

Expected results:
all specifed bindings should are removed.

Additional info:

Comment 1 Marko Luksa 2018-05-16 13:30:49 UTC
PR submitted: https://github.com/kubernetes-incubator/service-catalog/pull/2040

Comment 2 Marko Luksa 2018-05-29 14:50:37 UTC
Moving to 3.11, because my PR is waiting for another PR to be merged. This is going to take a day or two. Plus, the bug isn't really a blocker.

Comment 3 Jay Boyd 2018-08-07 17:20:00 UTC
This has been picked up by OpenShift 3.11.  Anything built since 18 July will include it, please make certain Service Catalog build is v0.1.24 or later.

Comment 4 Jian Zhang 2018-08-13 06:11:36 UTC
Change status to "ON_QA" since the version of svcat is v0.1.27.

Comment 5 Jian Zhang 2018-08-13 06:14:54 UTC
Test steps as below:
[root@qe-jiazha-round2master-etcd-1 ~]# svcat version
Client Version: v3.11.0-0.13.0;Upstream:v0.1.27
Server Version: v1.11.0+d4cacc0

[root@qe-jiazha-round2master-etcd-1 ~]# svcat get instance -n jian
            NAME              NAMESPACE           CLASS            PLAN           STATUS         
+---------------------------+-----------+-----------------------+---------+---------------------+
  brew-postgresql-apb-xq4rj   jian        brew-postgresql-apb     dev       ProvisionCallFailed  
  ups-instance                jian        user-provided-service   default   Ready                
  ups-instance2               jian        user-provided-service   default   Ready                

[root@qe-jiazha-round2master-etcd-1 ~]# svcat describe instance ups-instance2 -n jian
  Name:        ups-instance2                                                                      
  Namespace:   jian                                                                               
  Status:      Ready - The instance was provisioned successfully @ 2018-08-13 05:59:21 +0000 UTC  
  Class:       user-provided-service                                                              
  Plan:        default                                                                            

Parameters:
  No parameters defined

Bindings:
           NAME            STATUS  
+------------------------+--------+
  ups-instance2            Ready   
  ups-instance2-binding1   Ready

Both of the two bindings can be deleted successfully.   
[root@qe-jiazha-round2master-etcd-1 ~]# svcat unbind -n jian --name ups-instance2  --name ups-instance2-binding1
deleted ups-instance2
deleted ups-instance2-binding1


[root@qe-jiazha-round2master-etcd-1 ~]# svcat describe instance ups-instance2 -n jian
  Name:        ups-instance2                                                                      
  Namespace:   jian                                                                               
  Status:      Ready - The instance was provisioned successfully @ 2018-08-13 05:59:21 +0000 UTC  
  Class:       user-provided-service                                                              
  Plan:        default                                                                            

Parameters:
  No parameters defined

Bindings:
No bindings defined

LGTM, verify it.

Comment 7 errata-xmlrpc 2018-10-11 07:19:10 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-2018:2652