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 - [infrastructure_public_227] `oc idle --all-namespaces=true` can't work
Summary: [infrastructure_public_227] `oc idle --all-namespaces=true` can't work
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Solly Ross
QA Contact: DeShuai Ma
Depends On:
TreeView+ depends on / blocked
Reported: 2016-08-11 10:10 UTC by DeShuai Ma
Modified: 2016-08-12 14:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-08-12 14:20:52 UTC
Target Upstream Version:

Attachments (Terms of Use)

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.

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