Bug 1532975 - [APB] The apb tool should return fail info after the `apb run --tag` with invalid image
Summary: [APB] The apb tool should return fail info after the `apb run --tag` with inv...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.0
Assignee: David Zager
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-10 07:00 UTC by Jian Zhang
Modified: 2018-03-28 14:18 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-03-28 14:18:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:18:45 UTC

Description Jian Zhang 2018-01-10 07:00:15 UTC
Description of problem:
The dialog of the apb tool always stay on the "APB run started" phase, after the `apb run` runs fail.
Note that: I specify the image that the cluster could not download it.

Version-Release number of selected component (if applicable):
apb version: apb-1.1.2-1.20171221180811.fc25.noarch

How reproducible:
Always

Steps to Reproduce:

1, Install the apb tool in my local, not in the cluster.
su -c 'wget https://copr.fedorainfracloud.org/coprs/g/ansible-service-broker/ansible-service-broker-latest/repo/epel-7/group_ansible-service-broker-ansible-service-broker-latest-epel-7.repo -O /etc/yum.repos.d/ansible-service-broker.repo'

sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum -y install apb


2, Switch to su user and enable docker daemon

3, Clone the Hello World APB from https://github.com/ansibleplaybookbundle/hello-world-db-apb 

4, Login a cluster.

5, Provision it via the `apb run` command with an image which the cluster can't download it.

[root@localhost hello-world-apb]# apb run --project jian3 --tag docker.io/ansibleplaybookbundle/hello
Finished writing dockerfile.
Building APB using tag: [docker.io/ansibleplaybookbundle/hello]
Successfully built APB image: docker.io/ansibleplaybookbundle/hello
Creating project jian3
Created project
Creating service account in jian3
Created service account
Creating role binding for apb-run-hello-world-apbc9b76 in jian3
Created Role Binding
Creating pod with image docker.io/ansibleplaybookbundle/hello in jian3
Created Pod
APB run started


Actual results:

We can get the fail info from the cluster, but the dialog of the apb tool still stay on the "APB run started" phase.
[root@host-172-16-120-108 ~]# oc get pods -n jian3
NAME                           READY     STATUS             RESTARTS   AGE
apb-run-hello-world-apbpp9vj   0/1       ImagePullBackOff   0          29s

Expected results:
The dialog of the apb tool should return fail info, such as "APB run complete: Failed"

Additional info:

Comment 3 Jian Zhang 2018-01-25 07:14:17 UTC
The apb tool version:
[root@localhost mediawiki-apb]# rpm -qa | grep apb
apb-1.1.5-1.20180117190645.el7.centos.noarch

Followed the above steps, provision a non-exist image.

[root@localhost mediawiki-apb]# apb run --project jian2 --tag registry.access.redhat.com/openshift3/mediawiki-123:test --dockerfile Dockerfile-latest
Finished writing dockerfile.
Building APB using tag: [registry.access.redhat.com/openshift3/mediawiki-123:test]
Successfully built APB image: registry.access.redhat.com/openshift3/mediawiki-123:test
mediawiki_db_schema(required)[default: mediawiki]: 
mediawiki_site_name(required)[default: MediaWiki]: 
mediawiki_site_lang(required)[default: en]: 
mediawiki_admin_user(required)[default: admin]: 
mediawiki_admin_pass(required): 
ERROR: Please provide value for required parameter
mediawiki_admin_pass(required):  
ERROR: Please provide value for required parameter
mediawiki_admin_pass(required): test
Creating project jian2
Created project
Creating service account in jian2
Created service account
Creating role binding for apb-run-mediawiki-apb in jian2
Created Role Binding
Creating pod with image registry.access.redhat.com/openshift3/mediawiki-123:test in jian2
Created Pod
APB run started
APB run failed: (APB failed ImagePullBackOff - check name)
Reason: None


[root@host-172-16-120-121 ~]# oc get pods -n jian2
NAME                         READY     STATUS         RESTARTS   AGE
apb-run-mediawiki-apb6vpmb   0/1       ErrImagePull   0          31s


Provision failed and the user could get the returned error info. Looks good to me.

Comment 6 errata-xmlrpc 2018-03-28 14:18:26 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:0489


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