Bug 1541339 - [APB] The names of the deploy pods should be more readable
Summary: [APB] The names of the deploy pods should be more readable
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: Dylan Murray
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-02 10:25 UTC by Jian Zhang
Modified: 2018-03-28 14:26 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:25:43 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:26:08 UTC

Description Jian Zhang 2018-02-02 10:25:56 UTC
Description of problem:
Should add the action info into these deploy pods' name created by `apb run`.

Version-Release number of selected component (if applicable):
The apb tool version: 1.1.6
[root@localhost ~]# rpm -qa | grep apb
apb-1.1.6-1.20180123164703.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:

1, Enable the ASB to develop mode and log in the cluster.

2, Provision an APB.

[root@localhost postgresql-apb]# apb run --project jian3 --tag registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9 --dockerfile Dockerfile-latest
Finished writing dockerfile.
Building APB using tag: [registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9]
Successfully built APB image: registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9
Select plan [dev, prod]: 
ERROR: Please enter valid plan
Select plan [dev, prod]: 
ERROR: Please enter valid plan
Select plan [dev, prod]: 
ERROR: Please enter valid plan
Select plan [dev, prod]: dev
postgresql_database(required)[default: admin]: 
postgresql_user(required)[default: admin]: 
postgresql_password(required): test
postgresql_version(required)[default: 9.6]: 
Creating project jian3
Created project
Creating service account in jian3
Created service account
Creating role binding for apb-run-postgresql-apb in jian3
Created Role Binding
Creating pod with image registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9 in jian3
Created Pod
APB run started
APB run complete: Succeeded

[root@host-172-16-120-21 ~]# oc get pods -n jian3
NAME                                  READY     STATUS      RESTARTS   AGE
apb-run-postgresql-apbkbnvw           0/1       Completed   0          1m
postgresql-9.6-dev-7c4cd6ff4d-6kkvn   1/1       Running     0          1m

3, Deprovision it.
[root@localhost postgresql-apb]# apb run --project jian3 --tag registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9 --dockerfile Dockerfile-latest --action deprovision
Finished writing dockerfile.
Building APB using tag: [registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9]
Successfully built APB image: registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9
Select plan [dev, prod]: dev
postgresql_database(required)[default: admin]: 
postgresql_user(required)[default: admin]: 
postgresql_password(required): test
postgresql_version(required)[default: 9.6]: 
Creating project jian3
Project jian3 already exists
Creating service account in jian3
Service account apb-run-postgresql-apb already exists
Creating role binding for apb-run-postgresql-apb in jian3
Role binding apb-run-postgresql-apb already exists
Creating pod with image registry.access.stage.redhat.com/openshift3/postgresql-apb:v3.9 in jian3
Created Pod
APB run started
APB run complete: Succeeded

Actual results:
The pod name is confusing, like below:
[root@host-172-16-120-21 ~]# oc get pods -n jian3
NAME                          READY     STATUS      RESTARTS   AGE
apb-run-postgresql-apbkbnvw   0/1       Completed   0          4m
apb-run-postgresql-apbs2mht   0/1       Completed   0          2m


Expected results:
Add the action info into the pod name for better distinguish. 

Additional info:

Comment 4 Jian Zhang 2018-02-22 08:56:11 UTC
The apb tool version: 1.1.7
[root@localhost postgresql-apb]# apb version
Version: apb-1.1.7

Steps:
1, Enable the ASB to develop mode and log in the cluster.
2, Get the docker registry route and add it to your local docker registry.
[root@host-172-16-120-90 ~]# oc get route -n default
NAME               HOST/PORT                                               PATH      SERVICES           PORT      TERMINATION   WILDCARD
docker-registry    docker-registry-default.apps.0222-f3r.qe.rhcloud.com              docker-registry    <all>     passthrough   None

#vi /etc/sysconfig/docker
#systemctl restart docker
3, Log in the cluster and provision an APB.
[root@localhost postgresql-apb]# apb run --project test --registry-route docker-registry-default.apps.0222-f3r.qe.rhcloud.com --dockerfile Dockerfile-latest
Finished writing dockerfile.
Building APB using tag: [docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb]
Successfully built APB image: docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb
Pushing the image, this could take a minute...
Successfully pushed image: docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb
Select plan [dev, prod]: dev
postgresql_database(required)[default: admin]: 
postgresql_user(required)[default: admin]: 
postgresql_password(required): test
postgresql_version(required)[default: 9.6]: 
Creating project test
Project test already exists
Creating service account in test
Created service account
Creating role binding for apb-run-provision-postgresql-apb in test
Created Role Binding
Creating pod with image docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb in test
Created Pod
APB run started
Pod in phase: Pending
...
APB run failed: (APB failed ImagePullBackOff - check name)
Reason: None

4, Deprovision it.
[root@localhost postgresql-apb]# apb run --project test --registry-route docker-registry-default.apps.0222-f3r.qe.rhcloud.com --dockerfile Dockerfile-latest --action deprovision
Finished writing dockerfile.
Building APB using tag: [docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb]
Successfully built APB image: docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb
Pushing the image, this could take a minute...
Successfully pushed image: docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb
Select plan [dev, prod]: dev
postgresql_database(required)[default: admin]: 
postgresql_user(required)[default: admin]: 
postgresql_password(required): test
postgresql_version(required)[default: 9.6]: 
Creating project test
Project test already exists
Creating service account in test
Created service account
Creating role binding for apb-run-deprovision-postgresql-apb in test
Created Role Binding
Creating pod with image docker-registry-default.apps.0222-f3r.qe.rhcloud.com/openshift/postgresql-apb in test
Created Pod
APB run started
Pod in phase: Pending
...
APB run failed: (APB failed ImagePullBackOff - check name)
Reason: None

5, Check these deploy pods, we can see their names are clear and easy to read.
[root@host-172-16-120-90 ~]# oc get pods -n test
NAME                                      READY     STATUS             RESTARTS   AGE
apb-run-deprovision-postgresql-apb9sttc   0/1       ImagePullBackOff   0          15m
apb-run-provision-postgresql-apbh4km7     0/1       ImagePullBackOff   0          1h

The above `ImagePullBackOff` errors are tracking in bug 1541903. And for this fix, it looks good to me.

Comment 7 errata-xmlrpc 2018-03-28 14:25:43 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.