Bug 1265988 - oc/kubectl sub command like "oc/kubectl get/delete/describe..." action rule Inconsistent
oc/kubectl sub command like "oc/kubectl get/delete/describe..." action rule I...
Status: ASSIGNED
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Fabiano Franz
Wei Sun
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-24 05:11 EDT by DeShuai Ma
Modified: 2015-10-16 11:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 DeShuai Ma 2015-09-24 05:11:32 EDT
Description of problem:
When use "kubectl describe <resource> <resource_subname>" command describe resources, it should not need whole resource name, But this rule can't works for "kubectl describe <resource>/<resource_subname>". other kubectl sub command can't works for this rule.
our origin comand "oc" have same issue.

Version-Release number of selected component (if applicable):
Client Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.1.1235+795d6827c187ec-dirty", GitCommit:"795d6827c187ecaef5bc6833f7ffd730cdbeb326", GitTreeState:"dirty"}
Server Version: version.Info{Major:"1", Minor:"1+", GitVersion:"v1.1.0-alpha.1.1235+795d6827c187ec-dirty", GitCommit:"795d6827c187ecaef5bc6833f7ffd730cdbeb326", GitTreeState:"dirty"}

oc v1.0.6-129-gba55535
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:
Always

Steps to Reproduce:
1.Create a namespace
$ kubectl create -f namespace.yaml
$ kubectl get namespace
NAME            LABELS    STATUS    AGE
default         <none>    Active    1h
quota-example   <none>    Active    56m

2.Describe resource by "kubectl describe <resource> <resource_subname>"
$ kubectl describe namespace quota 
Name:    quota-example
Labels:    <none>
Status:    Active

No resource quota.

No resource limits.

3.Describe resource by "kubectl describe <resource>/<resource_subname>"
$ kubectl describe namespace/quota 
namespaces "quota" not found

4.Get resource by sub name
$ kubectl get namespace/quota 
Error from server: namespaces "quota" not found

Actual results:
3.Can't find resource by sub name
4.Can't find resource by sub name

Expected results:
For step1 can found by sub resource name, all the kubectl command should use this rule.

Additional info:
1.other kubectl command(like: delete ...)can't use sub name to control resource.
2.openshfit origin CLI command oc have same issue.
Comment 1 Fabiano Franz 2015-10-15 14:56:03 EDT
Fixed in kubernetes and rebased to origin master.
Comment 2 DeShuai Ma 2015-10-15 22:10:33 EDT
OpenShift version:
[fedora@ip-172-18-6-237 hello-openshift]$ openshift version
openshift v1.0.6-636-g3a0eaa1
kubernetes v1.1.0-alpha.1-653-g86b4e77

Steps:
[fedora@ip-172-18-6-237 hello-openshift]$ oc get project
NAME              DISPLAY NAME   STATUS
default                          Active
dma                              Active
openshift                        Active
openshift-infra                  Active
[fedora@ip-172-18-6-237 hello-openshift]$ oc describe project/de
namespaces "de" not found
[fedora@ip-172-18-6-237 hello-openshift]$ oc describe project de
Name:			default
Created:		12 minutes ago
Labels:			<none>
Annotations:		openshift.io/sa.initialized-roles=true
			openshift.io/sa.scc.mcs=s0:c1,c0
			openshift.io/sa.scc.uid-range=1000000000/10000
Display Name:		<none>
Description:		<none>
Status:			Active
Node Selector:		<none>
Quota:			<none>
Resource limits:	<none>

[fedora@ip-172-18-6-237 hello-openshift]$ oc get project de
Error from server: namespaces "de" not found
Comment 3 Fabiano Franz 2015-10-16 11:21:48 EDT
Only happens with partial resource names. Lowering severity.

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