Bug 1330845 - Some oc commands usage may be misleading due to options put after COMMAND such as oc set probe, oc debug etc
Summary: Some oc commands usage may be misleading due to options put after COMMAND suc...
Keywords:
Status: CLOSED DUPLICATE of bug 1322665
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 06:50 UTC by Dongbo Yan
Modified: 2016-06-07 06:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-07 06:29:57 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dongbo Yan 2016-04-27 06:50:06 UTC
Description of problem:
Using "oc set probe" command to set a probe in dc, when set an exec action(-- cmd) as a  probe in front of other options, other options will be a part of exec action, not independent option. 
Better to enhance usage info, like :  oc exec [options] POD [-c CONTAINER] -- COMMAND [args...]


Version-Release number of selected component (if applicable):
openshift v3.2.0.20
kubernetes v1.2.0-36-g4a3f9c5
etcd 2.2.5

How reproducible:
Always

Steps to Reproduce:
1.Create a project, and create a dc
2.set an exec action(-- cmd) as a  probe in front of other options,
$ oc set probe dc/mysql --liveness -- echo ok --period-seconds=20
3.when pod is running, check the probe in pod
$ oc describe pod mysql-2-tx02a

Actual results:
In step3:
 Liveness:		exec [echo ok --period-seconds=20] delay=0s timeout=1s period=10s #success=1 #failure=3

Expected results:
 Liveness:		exec [echo ok] delay=0s timeout=1s period=20s #success=1 #failure=3

Additional info:
when set an exec action(-- cmd) behind other options, like:$ oc set probe dc/mysql --liveness --period-seconds=20 -- echo ok , the result will be correct.

Comment 1 Xingxing Xia 2016-05-10 02:36:07 UTC
oc debug -h also shows:
Usage:
  oc debug RESOURCE/NAME [ENV1=VAL1 ...] [-c CONTAINER] [-- COMMAND] [options]

[options] is put after [-- COMMAND].

Though user may fix his bad experience if he knows the meaning of bash "--", it is better to adjust [options] before [-- COMMAND] in help info to avoid possible bad experience. For future new sub command like this, needs avoid it too.

Comment 2 Xingxing Xia 2016-06-07 06:29:57 UTC

*** This bug has been marked as a duplicate of bug 1322665 ***


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