Bug 850525

Summary: rhc-snapshot requires suffix '.tar.gz' but allows any suffix to be used
Product: OKD Reporter: Jhon Honce <jhonce>
Component: ocAssignee: Hiro Asari <hasari>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 2.xCC: ffranz, hasari, jkeck, rmillner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-16 19:41:25 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:
Embargoed:

Description Jhon Honce 2012-08-21 18:31:24 UTC
Description of problem:
If you don't use the suffix '.tar.gz' a misleading error message is generated and the command fails

Version-Release number of selected component (if applicable):
rhc-0.97.13-1.git.4.e9262da.el6.noarch

How reproducible:
Every time

Steps to Reproduce:
1. rhc-snapshot -pp -a zend001 -s snapshot.tgz
2. rhc-snapshot -pp -a zend001 -r snapshot.tgz
3.
  
Actual results:
# rhc-snapshot -a zend001 -r snapshot.tgz  -pp
Archive at snapshot.tgz does not contain the target application: ./*/zend001
If you created this archive rather than exported with rhc-snapshot, be sure
the directory structure inside the archive starts with ./<app_uuid>/
i.e.: tar -czvf <app_name>.tar.gz ./<app_uuid>/


Expected results:

 1. Either prevent me from creating a snapshot with the suffice .tgz

-Or-

 2. Verify the contents of the file, not the files suffix.

Additional info:

Comment 1 Hiro Asari 2012-11-16 19:41:25 UTC
"rhc-snapshot" is superseded by "rhc snapshot", with different arguments:

$ file snapshot.tgz 
snapshot.tgz: gzip compressed data, from Unix, last modified: Fri Nov 16 14:37:12 2012
$ bx bin/rhc snapshot save foo -f bar         
Password: 

Pulling down a snapshot to bar...
Waiting for stop to finish
Done
Creating and sending tar.gz
Done

RESULT:
Success

$ file bar
bar: gzip compressed data, from Unix, last modified: Fri Nov 16 14:38:37 2012
$ bx bin/rhc snapshot restore foo -f bar
Password: 

Restoring from snapshot bar...
Waiting for stop to finish
Done
Removing old data dir: ~/app-root/data/*
Restoring ~/app-root/data
Done

RESULT:
Success

===
Closing as WONTFIX.