Bug 1257996 - "oc status" makes it seem like multiple deployments are active
Summary: "oc status" makes it seem like multiple deployments are active
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Juan Vallejo
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-28 14:57 UTC by Erik M Jacobs
Modified: 2017-02-03 20:32 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-03 20:32:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Erik M Jacobs 2015-08-28 14:57:41 UTC
[root@ose3-master openshift-ansible]# oc version
oc v3.0.1.0-525-geddc479
kubernetes v1.0.0
[root@ose3-master openshift-ansible]# oc status
In project default

service/docker-registry - 172.30.241.157:5000
  dc/docker-registry deploys docker.io/openshift3/ose-docker-registry:v3.0.1.0 
    #2 deployed about a minute ago - 1 pod
    #1 deployed 3 minutes ago

service/kubernetes - 172.30.0.1:443

service/router - 172.30.141.219:80
  dc/router deploys docker.io/openshift3/ose-haproxy-router:v3.0.1.0 
    #1 deployed 8 minutes ago - 1 pod

To see more, use 'oc describe <resource>/<name>'.
You can use 'oc get all' to see a list of other objects.
[root@ose3-master openshift-ansible]# oc get pod
NAME                      READY     STATUS    RESTARTS   AGE
docker-registry-2-4wsuk   1/1       Running   0          1m
router-1-lw8ef            1/1       Running   0          8m
[root@ose3-master openshift-ansible]# oc get rc
CONTROLLER          CONTAINER(S)   IMAGE(S)                                  SELECTOR                                                                                REPLICAS
docker-registry-1   registry       openshift3/ose-docker-registry:v3.0.1.0   deployment=docker-registry-1,deploymentconfig=docker-registry,docker-registry=default   0
docker-registry-2   registry       openshift3/ose-docker-registry:v3.0.1.0   deployment=docker-registry-2,deploymentconfig=docker-registry,docker-registry=default   1
router-1            router         openshift3/ose-haproxy-router:v3.0.1.0    deployment=router-1,deploymentconfig=router,router=router                               1



Since deployment #1 is no longer running, I would expect to see some indication that it isn't there. Simply listing it makes it seem like it's still running, even though no pods for deployment 1 are.

Comment 2 Juan Vallejo 2017-02-01 20:01:13 UTC
> Since deployment #1 is no longer running, I would expect to see some indication that it isn't there. Simply listing it makes it seem like it's still running, even though no pods for deployment 1 are.

I don't know if I agree with this. The latest deployment is always listed first. It also displays the number of pods it currently has, while past deployments do not. This, to me, seems like enough information to know which deployment is still relevant.

I am closing this as NOTABUG but please re-open if you feel this should still be addressed

Comment 3 Erik M Jacobs 2017-02-01 21:15:11 UTC
I would think "0 pods" would be clearer than no text...

Right now it really is not providing any indication that the older deployment is not running / defunct / nothing going on.

Comment 4 Juan Vallejo 2017-02-01 22:01:33 UTC
Thanks for clarifying, opened a PR to include pod number for old deployments:
https://github.com/openshift/origin/pull/12763

Comment 5 Juan Vallejo 2017-02-03 20:32:12 UTC
Closing, please see https://github.com/openshift/origin/pull/12763#issuecomment-277349380. The initial decision to omit "0 pods" from old deployments was deliberate.


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