Bug 1139608

Summary: rhc snapshot save different app with the same name in the same dir didn't prompt conflict information
Product: OpenShift Container Platform Reporter: wangyanyan <yanywang>
Component: ocAssignee: Vu Dinh <vdinh>
Status: CLOSED ERRATA QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: medium    
Version: 2.1.0CC: adellape, anli, bleanhar, jialiu, jokerman, libra-onpremise-devel, mmccomas, tiwillia, xtian, yanpzhan
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Due to lack of file name checking, the `rhc snapshot` command would previously overwrite the snapshot file of an application without warning the user. If the snapshot file already existed, it was written if `rhc snapshot` was executed on the same application. This bug fix adds proper file name checking to notify users if the same file name already exists. Then, it allows users to input their option to overwrite the file or not.
Story Points: ---
Clone Of:
: 1141093 (view as bug list) Environment:
Last Closed: 2015-12-17 17:09:30 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:
Bug Depends On: 1141093, 1308716    
Bug Blocks:    

Description wangyanyan 2014-09-09 10:27:27 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 wangyanyan 2014-09-09 10:43:12 UTC
Description of problem:
 
rhc snapshot save a app with the name a.tar.gz in /root/desktop dir, snapshot save another app with the same name a.tar.gz in /root/desktop dir, system didn't prompt conflict information

Version-Release number of selected component (if applicable):
rhc 1.29.3.1

How reproducible:
always

Steps to Reproduce:
1.rhc snapshot save app -f 'a.tar.gz'
2.rhc snapshot save app2 -f 'a.tar.gz'

Actual results:
after step 1~2, prompt conflict information

Expected results:
after step 1~2, didn't prompt conflict information , cover the first file.

Additional info:

Comment 7 Yanping Zhang 2015-12-07 04:49:41 UTC
Tested on puddle:OpenShiftEnterpriseErrata/2.2/2015-12-03.1
# rpm -qa|grep rhc
rhc-1.38.4.3-1.el6op.noarch
Step to verify:
1.Create a file in the working directory 'example.tar.gz'
# echo "test" > ./example.tar.gz
2.Create an app
# rhc app create rb1 ruby-2.0
3.Snapshot the app to an existing file:
# rhc snapshot save -a rb1 -f example.tar.gz 
File example.tar.gz already exists. Do you want to overwrite this file? (yes|no): yes
Pulling down a snapshot of application 'rb1' to example.tar.gz ... done
# rhc snapshot save -a rb1 -f example.tar.gz 
File example.tar.gz already exists. Do you want to overwrite this file? (yes|no): no

There is prompt info to ask if the file should be overwritten. The bug has been fixed, so move it to Verified.

Comment 9 errata-xmlrpc 2015-12-17 17:09:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-2666.html