Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1366220

Summary: [infrastructure_public_227] `oc idle --all-namespaces=true` can't work
Product: OpenShift Container Platform Reporter: DeShuai Ma <dma>
Component: PodAssignee: Solly Ross <sross>
Status: CLOSED NOTABUG QA Contact: DeShuai Ma <dma>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.0CC: aos-bugs, jokerman, mmccomas, wmeng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-12 14:20:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description DeShuai Ma 2016-08-11 10:10:13 UTC
Description of problem:
Create two projects and every project has svc, then run `oc idle --all-namespaces=true`, it can't idle all the service, and get "error: no valid scalable resources found to idle: namespace may not be empty when retrieving a resource by name".

Version-Release number of selected component (if applicable):
openshift v3.3.0.18
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

How reproducible:

Steps to Reproduce:
1. Create two project and every project has svc and rc
$ oc login $server
$ oc new-project dma
$ oc create -f
$ oc new-project dma1
$ oc create -f

2.Idle service in all namespace
$ oc idle hello-svc --all-namespaces=true

Actual results:
2. [root@dhcp-128-7 dma]# oc idle hello-svc --all-namespaces=true
error: no valid scalable resources found to idle: namespace may not be empty when retrieving a resource by name

Expected results:
2. Idle all the svc in all project if the user has admin policy with the projects.

Additional info:

Comment 1 Solly Ross 2016-08-12 14:20:52 UTC
Passing --all-namespaces with a service name does not seem to be supported by other commands, so I think it's fine for `oc idle` to have the same behavior.  It works fine with `--all`, which I think is the desired effect.