Bug 1316157 - [DOCS] oc port-forward/exec documentation and cli help use examples with deprecated syntax
[DOCS] oc port-forward/exec documentation and cli help use examples with depr...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation (Show other bugs)
3.2.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Ashley Hardin
Xingxing Xia
Vikram Goyal
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-09 09:33 EST by Mike Fiedler
Modified: 2016-07-15 11:12 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-15 11:12:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Fiedler 2016-03-09 09:33:29 EST
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-06 22:12:41 EDT
For oc exec, the documentation is right. But cli help also uses -p
Comment 3 Ashley Hardin 2016-06-15 11:06:47 EDT
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 11:07:37 EDT
@ Mike, Please review as well. Thanks.
Comment 5 Mike Fiedler 2016-06-15 11:51:54 EDT
+1 for me.
Comment 7 Mike Fiedler 2016-06-15 13:26:55 EDT
The CLI is, paradoxically, maintained by the Web UI team.  Added jforrest to the cc:
Comment 8 Fabiano Franz 2016-06-15 14:58:15 EDT
CLI issue fixed in https://github.com/openshift/origin/pull/9351
Comment 9 Xingxing Xia 2016-06-16 03:44:01 EDT
@ 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 09:32:02 EDT
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 11:17:51 EDT
Right, `oc exec` fixed in https://github.com/openshift/origin/pull/9382.
Comment 12 Xingxing Xia 2016-06-17 03:44:53 EDT
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.