Bug 1298132 - oc get <resource> -L failed in listing labels seprately in columns for build,bc,dc,is
Summary: oc get <resource> -L failed in listing labels seprately in columns for build,...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-13 10:22 UTC by Xia Zhao
Modified: 2016-09-19 13:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-19 13:52:37 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Xia Zhao 2016-01-13 10:22:51 UTC
Description of problem:
By specifying -L flag in oc get <resource> command, we expect the existing labels to be listed seprately in columns for this resource, but this currently only work for po,rc and svc, and print empty grids for build,bc,dc and is

origin/cli
M
M

Version-Release number of selected component (if applicable):
oc v1.1-428-ged29520
kubernetes v1.1.0-origin-1107-g4c8e6f4

Steps to Reproduce:
1. oc login openshift, create a new project
2. oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json, wait for build completes and app pods running
3. Validate if oc get <resource> -L <label1>,<label2>,... can list labels in specified columns successfully:

take buildconfig as example:
<resource>=bc:
$ oc describe bc ruby-sample-build | grep -i labels
Labels:                        name=ruby-sample-build,template=application-template-stibuild
$ oc get bc -L name,template
NAME                TYPE      FROM      LATEST    NAME      TEMPLATE
ruby-sample-build   Source    Git       1

Actual Result:
oc get <resource> -L not be able to list existing labels seprately in columns for build,bc,dc,is
oc get <resource> -L is only able to list existing labels seprately in columns for po,rc,svc (see more details in "additional info")

Expected Result:
oc get <resource> -L should be able to list existing labels seprately in columns for build,bc,dc,is successfully

Additional info:
The behavior of the passed scenarios:
when <resource>=po:
$ oc describe po frontend-1-x9n43 | grep -i labels
Labels:                                deployment=frontend-1,deploymentconfig=frontend,name=frontend
$ oc get po frontend-1-x9n43 -L deployment,deploymentconfig
NAME               READY     STATUS    RESTARTS   AGE       DEPLOYMENT   DEPLOYMENTCONFIG
frontend-1-x9n43   1/1       Running   0          57m       frontend-1   frontend

Comment 1 Fabiano Franz 2016-07-04 22:01:41 UTC
Fixed in master.

Comment 2 Xia Zhao 2016-07-05 08:14:58 UTC
Verified on origin env , issue fixed well, thanks!

oc v1.3.0-alpha.2-368-g6fe8452
kubernetes v1.3.0-alpha.3-599-g2746284


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