Bug 1316157 - [DOCS] oc port-forward/exec documentation and cli help use examples with deprecated syntax
Summary: [DOCS] oc port-forward/exec documentation and cli help use examples with depr...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ashley Hardin
QA Contact: Xingxing Xia
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-09 14:33 UTC by Mike Fiedler
Modified: 2016-07-15 15:12 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-15 15:12:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Fiedler 2016-03-09 14:33:29 UTC
Document URL: 

1. https://docs.openshift.org/latest/dev_guide/port_forwarding.html
2. oc help port-forward

Section Number and Name: 

Devloper Guide -> Port Forwarding

Describe the issue: 

The document and online help both give several examples using the -p option to specify the pod.  In 3.2, using the -p option gives a warning message that the flag has been deprecated.  The new syntax is:

oc port-forward POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] [options]


Suggestions for improvement: 

Remove -p

Additional information:

Comment 1 Xingxing Xia 2016-06-07 02:12:41 UTC
For oc exec, the documentation is right. But cli help also uses -p

Comment 3 Ashley Hardin 2016-06-15 15:06:47 UTC
Work in progress: https://github.com/openshift/openshift-docs/pull/2286

@Andrew, please review and note the comment from Xingxing Xia regarding CLI help. Thanks!

Comment 4 Ashley Hardin 2016-06-15 15:07:37 UTC
@ Mike, Please review as well. Thanks.

Comment 5 Mike Fiedler 2016-06-15 15:51:54 UTC
+1 for me.

Comment 7 Mike Fiedler 2016-06-15 17:26:55 UTC
The CLI is, paradoxically, maintained by the Web UI team.  Added jforrest to the cc:

Comment 8 Fabiano Franz 2016-06-15 18:58:15 UTC
CLI issue fixed in https://github.com/openshift/origin/pull/9351

Comment 9 Xingxing Xia 2016-06-16 07:44:01 UTC
@ Ashley Hardin
The doc PR LGTM. Thanks!

@ Fabiano Franz
Tested with oc v1.3.0-alpha.1-379-g662753c, works:
oc port-forward -h
Examples:
  # Listens on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod
  oc port-forward mypod 5000 6000
...

Options:
  -p, --pod='': Pod name (deprecated)

Seems better to correct `oc exec -h` too (comment 1)? As far as I know, that is the only left sub-command with deprecated '--pod'. Thank you.

Comment 10 openshift-github-bot 2016-06-16 13:32:02 UTC
Commits pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/ce42059390553c6260b2ce827019e098552a7881
Bug 1316157, updated outdated syntax instances of

https://github.com/openshift/openshift-docs/commit/f05a5d852eca9b6af2f039e31be1e35a09fefc45
Merge pull request #2286 from ahardin-rh/port-forwarding

Bug 1316157, updated outdated syntax instances of oc port-forward -p

Comment 11 Fabiano Franz 2016-06-16 15:17:51 UTC
Right, `oc exec` fixed in https://github.com/openshift/origin/pull/9382.

Comment 12 Xingxing Xia 2016-06-17 07:44:53 UTC
Thanks. Saw the change of `oc exec -h` in devenv-rhel7_4393, looks fine.


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