Bug 860913 - [US2817][fork] Snapshot app save/restore fails with old command "rhc app snapshot"
[US2817][fork] Snapshot app save/restore fails with old command "rhc app snap...
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-27 01:27 EDT by Jianwei Hou
Modified: 2015-05-14 22:05 EDT (History)
2 users (show)

See Also:
Fixed In Version: fork_ami_BZ860913
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:50:19 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-27 01:27:08 EDT
Description of problem:
Take snapshot of an application with old command "rhc app snapshot", command fails  with "Too many arguments passed in" , but it should still work since we have alias for it, or will it be totally removed?

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

How reproducible:
Always

Steps to Reproduce:
1. Create an app
2. Snapshot app with 'rhc app snapshot', command fails with "Too many arguments passed in"  
  
Actual results:
hjw@my apps$ rhc app snapshot save -a app1 -f app1.tar.gz -px -d
D, [2012-09-27T13:01:42.278441 #7838] DEBUG -- : Connecting to https://ec2-23-20-246-48.compute-1.amazonaws.com/broker/rest/api
D, [2012-09-27T13:01:43.524667 #7838] DEBUG -- : Getting all domains
D, [2012-09-27T13:01:43.524899 #7838] DEBUG -- : Request: #<RestClient::Request:0x00000002e60aa8 @method="GET", @headers={:accept=>:json, "Authorization"=>"Basic amhvdUByZWRoYXQuY29tOng=", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, @url="https://ec2-23-20-246-48.compute-1.amazonaws.com/broker/rest/domains", @cookies={}, @payload="", @user=nil, @password=nil, @timeout=nil, @open_timeout=nil, @raw_response=false, @verify_ssl=false, @ssl_client_cert=nil, @ssl_client_key=nil, @ssl_ca_file=nil, @tf=nil, @processed_headers={"Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"Basic amhvdUByZWRoYXQuY29tOng=", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)", "Content-Length"=>"0", "Content-Type"=>"application/x-www-form-urlencoded"}, @args={:url=>"https://ec2-23-20-246-48.compute-1.amazonaws.com/broker/rest/domains", :method=>"GET", :headers=>{:accept=>:json, "Authorization"=>"Basic amhvdUByZWRoYXQuY29tOng=", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, :payload=>{}, :timeout=>nil}>
Too many arguments passed in.

Usage: rhc snapshot restore <application>

Restores a previously saved snapshot.

Options for snapshot restore
  -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


Tried to snapshot save an app, but messages returns a restore instruction.

Expected results:
Now that 'rhc app snapshot' is an alias of 'rhc snapshot', it should run successfully.

Additional info:
Both the following command syntaxs failed 
rhc app snapshot save -a app1 -f app1.tar.gz
rhc app snapshot save app1 -f app1.tar.gz

Same problems also happened with 'rhc app snapshot restore'
Comment 1 Fabiano Franz 2012-09-27 23:31:41 EDT
Fixed in fork_ami_BZ860913.
Comment 2 Jianwei Hou 2012-09-28 05:42:34 EDT
Verified on fork_ami_BZ860913

Steps:
1. create an app
2. Snapshot app with 'rhc app snapshot save' command
3. make some change to app and git push
4. restore app with 'rhc app snapshot restore' command

Result:
rhc app snapshot save/restore [-a] appname -f app1.tar.gz works without errors.

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