Bug 810443

Summary: restore snapshot without '-f' option should return expected error message
Product: OKD Reporter: Meng Bo <bmeng>
Component: ocAssignee: John (J5) Palmieri <johnp>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 1.xCC: jkeck, rmillner, xtian
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhc-0.90.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-13 18:32:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Meng Bo 2012-04-06 07:40:38 UTC
Description of problem:
create app and take a snapshot for it, try to restore the snapshot to the app without '-f'/'--filepath' option, will get some error messages.

Version-Release number of selected component (if applicable):
rhc-0.89.12-1.el6_2.noarch

How reproducible:
always

Steps to Reproduce:
1.create app
rhc app create -a php1 -t php-5.3
2.take snapshot 
rhc app snapshot -a php1
3.try to restore the snapshot without -f option
  
Actual results:
[bmeng@localhost jbs1]$ rhc app snapshot restore -a jbs1
Password: 
/usr/lib/ruby/gems/1.8/gems/rhc-0.89.12/bin/rhc-app:385:in `exists?': can't convert nil into String (TypeError)
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.89.12/bin/rhc-app:385:in `save_or_restore_snapshot'
	from /usr/lib/ruby/gems/1.8/gems/rhc-0.89.12/bin/rhc-app:572
	from /usr/bin/rhc-app:19:in `load'
	from /usr/bin/rhc-app:19


Expected results:
some meaningful messages like "snapshot file has not been specified" should be shown.

Additional info:
snapshot can be restored successfully with the correct command.

Comment 1 John (J5) Palmieri 2012-04-11 17:02:56 UTC
commit d095b38659b2c8a97f20967a020f0f2ff7633925

Comment 2 Meng Bo 2012-04-12 03:35:51 UTC
verified on rhc-0.90.4
issue has been fixed.