Bug 1402356

Summary: Wrong and non-understandable message of oc idle
Product: OpenShift Container Platform Reporter: Xingxing Xia <xxia>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, jokerman, jvallejo, mmccomas, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Output from the `oc idle` command was confusing to end users. Consequence: A user could not easily tell what was being done by the `oc idle` command. Fix: The output of the `oc idle` command was updated to clarify what the command had done. Result: The output of `oc idle` (errors or otherwise) is now easier to understand.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-12 19:17:48 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:
Embargoed:

Description Xingxing Xia 2016-12-07 10:32:42 UTC
Description of problem:
Wrong and non-understandable message of oc idle

Version-Release number of selected component (if applicable):
oc v3.4.0.33

How reproducible:
Always

Steps to Reproduce:
1. Create project. Create app
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json
2. Wait database is deployed. Then:
$ oc idle database --dry-run=false
3. $ oc get endpoints database
NAME       ENDPOINTS   AGE
database   <none>      3h

Actual results:
Though step 3 shows `oc idle` takes effect, step 2 outputs 'dry run':
$ oc idle database --dry-run=false
Marked service xxia-proj/database to unidle resource DeploymentConfig xxia-proj/database (unidle to 1 replicas)
Idled DeploymentConfig xxia-proj/database (dry run)

Besides, 'Marked service xxia-proj/database to unidle resource DeploymentConfig xxia-proj/database (unidle to 1 replicas)' is hard to understand. Is it wanting to express 'idle' or 'unilde'? It is obscure that 'unidle' is adj or verb?

Expected results:
2. Should remove 'dry run'.
'Marked service xxia-proj/database to unidle resource DeploymentConfig xxia-proj/database (unidle to 1 replicas)' could be simply removed or improved.

Additional info:

Comment 1 Juan Vallejo 2017-01-30 19:22:17 UTC
Related PR: https://github.com/openshift/origin/pull/12718

Comment 2 Xingxing Xia 2017-02-20 08:03:06 UTC
Verified in oc v3.5.0.31-1. Now step 2 can output clearer message:
$ oc idle database --dry-run=false
The service "xxia-proj/database" has been marked as idled 
The service will unidle DeploymentConfig "xxia-proj/database" to 1 replicas once it receives traffic 
DeploymentConfig "xxia-proj/database" has been idled

Besides, tested other scenarios "when idling a service with one or more scalable refs, no scalable refs (or a service that has already been idled), and when idling a service with the --dry-run flag" mentioned in https://github.com/openshift/origin/pull/12718, their output messages are good, as shown in the PR comment. Thx

Comment 4 errata-xmlrpc 2017-04-12 19:17:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0884