Bug 1257996 - "oc status" makes it seem like multiple deployments are active
"oc status" makes it seem like multiple deployments are active
Status: CLOSED NOTABUG
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.0.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Juan Vallejo
Yanping Zhang
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 10:57 EDT by Erik M Jacobs
Modified: 2017-02-03 15:32 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-03 15:32:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Erik M Jacobs 2015-08-28 10:57:41 EDT
[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 15:01:13 EST
> 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 16:15:11 EST
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 17:01:33 EST
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 15:32:12 EST
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.