Bug 1572133 - [APB] `apb remove --all -l` couldn't remove all images permanently from internal OpenShift registry
Summary: [APB] `apb remove --all -l` couldn't remove all images permanently from inte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.0
Assignee: Dylan Murray
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-26 09:08 UTC by sunzhaohua
Modified: 2018-07-30 19:14 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-07-30 19:14:14 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:14:34 UTC

Description sunzhaohua 2018-04-26 09:08:05 UTC
Description of problem:
`apb remove --all -l` couldn't remove all images permanently from internal OpenShift registry

Version-Release number of selected component (if applicable):
openshift v3.10.0-0.29.0
Version: apb-1.2.4

How reproducible:
Always

Steps to Reproduce:
1. set ASB registry is local-registry then push images

2. run `apb list`
# apb list
ID                                NAME                   DESCRIPTION                                         
36077d69b057756261f2c43e6542a34b  local-hello-world-apb  deploys hello-world web application                 
21ab83fa67177b000aecdbc42474404d  local-my-local1-apb    This is a sample application generated by apb init  

3. run `apb remove --all -l`
# apb remove --all -l
Successfully relisted the Service Catalog
Successfully deleted APB

# apb list
No APBs found

4. Run `apb bootstrap`
# apb bootstrap 
Successfully bootstrapped Ansible Service Broker
Successfully relisted the Service Catalog

5. run `apb list`

Actual results:
`apb remove --all -l` couldn't remove image  permanently from internal OpenShift registry.

# apb list
ID                                NAME                   DESCRIPTION                                         
36077d69b057756261f2c43e6542a34b  local-hello-world-apb  deploys hello-world web application                 
21ab83fa67177b000aecdbc42474404d  local-my-local1-apb    This is a sample application generated by apb init  

Expected results:
apb remove with `--all -l` option could remove all image permanently from internal OpenShift registry. We should support that usage, if not, please add some warnnings.

Additional info:

Comment 1 Paul Morie 2018-04-26 13:35:40 UTC
This should be under the 'Service Broker' component since it's a function of the ansible broker.

Comment 2 Dylan Murray 2018-04-27 14:56:24 UTC
`apb remove --all` was not meant to be used with the `-l` flag but the tooling did not spit out a warning. I am going to instead make this a valid option and the tooling will simply delete all images in the registry that end in `*-apb`.

Comment 3 Dylan Murray 2018-04-27 14:56:24 UTC
`apb remove --all` was not meant to be used with the `-l` flag but the tooling did not spit out a warning. I am going to instead make this a valid option and the tooling will simply delete all images in the registry that end in `*-apb`.

Comment 6 sunzhaohua 2018-05-15 03:09:07 UTC
verified

apb version
Version: apb-1.2.8

# apb list
ID                                NAME             DESCRIPTION                                         
0cd794ef27f565cc0e755585dbbcdcdc  local-my-01-apb  This is a sample application generated by apb init  
02461192cf28f69c1fb792f32cb58a74  local-my-02-apb  This is a sample application generated by apb init  

# apb remove --all -l
Attempting to remove all registry images ending in: *-apb
Found image: docker-registry.default.svc:5000/openshift/my-02-apb
Successfully deleted sha256:8cbfc3dd7a7390e29bebb05d3bb65035ccc6a825633e9a6bcbde0f8788be0d5e
Found image: docker-registry.default.svc:5000/openshift/my-01-apb
Successfully deleted sha256:db11f7a0027110dd5b18155f69649b8f75cbc348fec8dfcbba2309e6c708de64
Contacting the ansible-service-broker at: https://asb-1338-openshift-ansible-service-broker.apps.0514-x3n.qe.rhcloud.com/ansible-service-broker/v2/bootstrap
Successfully bootstrapped Ansible Service Broker

# apb list
No APBs found

# apb bootstrap
Successfully bootstrapped Ansible Service Broker
Successfully relisted the Service Catalog

# apb list
No APBs found

Comment 8 errata-xmlrpc 2018-07-30 19:14:14 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:1816


Note You need to log in before you can comment on or make changes to this bug.