+++ This bug was initially created as a clone of Bug #1141093 +++ +++ This bug was initially created as a clone of Bug #1139608 +++ 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: Tested on STG(devenv-stage_1006), same issue in OpenShift Online --- Additional comment from Vu Dinh on 2015-11-25 14:53:08 EST --- The description for this bug doesn't match the Actual/Expected results section. I believe they are switched. It should be like this instead: Actual results: after step 1~2, didn't prompt conflict information , cover the first file. Expected results: after step 1~2, prompt conflict information Thanks, Vu --- Additional comment from openshift-github-bot on 2015-12-03 10:46:53 EST --- Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/f982979f0c198dbb5992439ffb340a9deacaae7b Bug 1141093 - rhc snapshot save same filename didn't prompt conflict warning The 'rhc snapshot save -f' command overwrites existing file without warning if user inputs same filename for two different apps. This commit modifies the rhc snapshow command to verify if the file already exists and ask user for confirmation before proceeding. Bug 1141093 Link <https://bugzilla.redhat.com/show_bug.cgi?id=1141093> Signed-off-by: Vu Dinh <vdinh> --- Additional comment from Qixuan Wang on 2015-12-04 04:16:41 EST --- Tested on devenv_5729, rhc-1.38.4, I agree with your comment 1, that sounds more reasonable. The bug has been fixed, thanks. Here is the result: [root@qwang test]# rhc snapshot save py26 -f 'app.tar.gz' Pulling down a snapshot of application 'py26' to app.tar.gz ... done [root@qwang test]# rhc snapshot save php54 -f 'app.tar.gz' File app.tar.gz already exists. Do you want to overwrite this file? (yes|no): yes Pulling down a snapshot of application 'php54' to app.tar.gz ... done
The bug https://bugzilla.redhat.com/show_bug.cgi?id=1311034 blocks the OSE v2 environment installation. I'm going to check the bug once environment ready.
Verify with rhc-1.38.6.1-1.el6op.noarch Make snapshot for two app with the same name: [root@broker ~]# rhc snapshot save app1 -f 'test.tar.gz' Pulling down a snapshot of application 'app1' to test.tar.gz ... done [root@broker ~]# rhc snapshot save test1 -f 'test.tar.gz' File test.tar.gz already exists. Do you want to overwrite this file? (yes|no): yes Pulling down a snapshot of application 'test1' to test.tar.gz ... done Check test.tar.gz, contains compressed files of test1 app.
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-2016-0489.html