Bug 1139608 - rhc snapshot save different app with the same name in the same dir didn't prompt conflict information
Summary: rhc snapshot save different app with the same name in the same dir didn't pr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 2.1.0
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ---
: ---
Assignee: Vu Dinh
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On: 1141093 1308716
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-09 10:27 UTC by wangyanyan
Modified: 2016-02-15 21:01 UTC (History)
10 users (show)

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.
Clone Of:
: 1141093 (view as bug list)
Environment:
Last Closed: 2015-12-17 17:09:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2666 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.8 security, bug fix, and enhancement update 2015-12-17 22:07:54 UTC

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


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