Bug 860896 - [fork] Invalid "-n" option for rhc snapshot
[fork] Invalid "-n" option for rhc snapshot
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-26 23:30 EDT by Jianwei Hou
Modified: 2015-05-14 22:05 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:49:57 EST
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 Jianwei Hou 2012-09-26 23:30:55 EDT
Description of problem:
run 'rhc snapshot save/restore --help', a '-n' option is given which is used with port forward commands but not snapshot

Version-Release number of selected component (if applicable):
on fork_ami_US2597_US2599_US2813_US2817_US2872_172

How reproducible:
Always

Steps to Reproduce:
1. run 'rhc snapshot save/restore --help'

  
Actual results:
[root@ip-10-191-161-207 ~]# rhc snapshot save --help
Usage: rhc snapshot save <application>

Pull down application snapshot for the specified application.

Options for snapshot save
  -n, --namespace namespace Namespace of the application you are port forwarding to
  -f, --filepath filepath   Local path to save tarball (default: ./$APPNAME.tar.gz)
  -a, --app app             Application you are port forwarding to (required)

Global Options
  -l, --rhlogin login       OpenShift login
  -p, --password password   OpenShift password
  -d, --debug               Turn on debugging
  --noprompt                Do not ask for input
  --config FILE             Path of a different config file
  -h, --help                Display help documentation
  -v, --version             Display version information
  -t, --trace               Display backtrace when an error occurs


The -n option is used with threaddump command, and it is a wrong option for snapshot.
[root@ip-10-191-161-207 ~]# rhc snapshot -n fk177 -d
invalid option: -n


Expected results:
The '-n' option is not relevant with snapshot command, and should not be displayed.

Additional info:
Comment 1 Jianwei Hou 2012-09-27 02:34:54 EDT
Since '-n' will be used for multi-domains in the future, should it be a valid option for 'rhc snapshot'?
Comment 2 Fabiano Franz 2012-09-27 17:53:44 EDT
The -n (namespace) option was added to future support multi-domains and it's available not only for the snapshot command but also to most of the refactored commands, like "rhc app start <app> -n <namespace>", "rhc port-forward <app> -n <namespace>", "rhc snapshot save/restore <app> -n <namespace>" and so on. 

So the option "-n" is correct for snapshot, like "rhc snapshot save/restore <app> -n <namespace>".

Your example missed "save/restore", that's why you got "invalid option: -n". The -n option is indeed invalid for "rhc snapshot" without "save/restore".

So I think the only bug left here is the description of the -n option (currently "Namespace of the application you are port forwarding to", which is incorrect). That message was fixed together with the fix for BZ 860913, you are receiving a fork_ami for that one.
Comment 3 Jianwei Hou 2012-09-27 23:06:19 EDT
Verified on fork_ami_US2597_US2599_US2813_US2817_US2872_173

Steps:
1. run 'rhc snapshot save/restore --help'

hjw@my apps$ rhc snapshot save --help
Usage: rhc snapshot save <application>

Pull down application snapshot for the specified application.

Options for snapshot save
  -n, --namespace namespace Namespace of the application you are saving a snapshot
................

2. Snapshot save/restore app with "-n" option
No snapshot save/restore works fine.

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