Bug 1265988 - oc/kubectl sub command like "oc/kubectl get/delete/describe..." action rule Inconsistent
Summary: oc/kubectl sub command like "oc/kubectl get/delete/describe..." action rule I...
Keywords:
Status: CLOSED EOL
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-24 09:11 UTC by DeShuai Ma
Modified: 2019-08-21 10:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-21 10:03:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description DeShuai Ma 2015-09-24 09:11:32 UTC
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 18:56:03 UTC
Fixed in kubernetes and rebased to origin master.

Comment 2 DeShuai Ma 2015-10-16 02:10:33 UTC
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 15:21:48 UTC
Only happens with partial resource names. Lowering severity.

Comment 4 Maciej Szulik 2019-08-21 10:03:51 UTC
Closing due to age.


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