Bug 1127620 - Should remove useless snapshot files left in newly created app when cloning app which have database added
Summary: Should remove useless snapshot files left in newly created app when cloning a...
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Miciah Dashiel Butler Masters
QA Contact: libra bugs
Depends On:
Blocks: 1155526
TreeView+ depends on / blocked
Reported: 2014-08-07 09:18 UTC by Liang Xia
Modified: 2017-05-31 18:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1155526 (view as bug list)
Last Closed: 2017-05-31 18:22:11 UTC

Attachments (Terms of Use)

Description Liang Xia 2014-08-07 09:18:58 UTC
Description of problem:
After the procedure of clone app from existing app(with database) is done, 
a file named <db-name>-<version>.tar.gz is left over in folder app-root/data/.
e.g, mongodb-2.4.tar.gz  mysql-5.1.tar.gz    postgresql-9.2.tar.gz

These files should be removed after the procedure of clone is done as these files can be pretty large.

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

How reproducible:

Steps to Reproduce:
1.Create an app with database added
2.Create a new app from above app.
$ rhc create-app appclone --from-app apporigin
3.Check files under folder app-root/data/ in gears of above two apps.

Actual results:
A file named <db-name>-<version>.tar.gz is left over in folder app-root/data/,
e.g, mongodb-2.4.tar.gz  mysql-5.1.tar.gz    postgresql-9.2.tar.gz

Expected results:
These files should be removed after the procedure of clone is done as these files can be pretty large.

Additional info:
[clone-lxia.dev.rhcloud.com 53e3683da750647498000142]\> ls -lh app-root/data/
total 13M
-rw-------. 1 53e3683da750647498000142 53e3683da750647498000142 498K Aug  7 07:58 mongodb-2.4.tar.gz
-rw-------. 1 53e3683da750647498000142 53e3683da750647498000142 511K Aug  7 07:58 mysql-5.1.tar.gz
-rw-------. 1 53e3683da750647498000142 53e3683da750647498000142  12M Aug  7 07:58 postgresql-9.2.tar.gz
-rw-------. 1 53e3683da750647498000142 53e3683da750647498000142   23 Aug  7 08:09 scale_limits.txt

Comment 1 Fabiano Franz 2014-10-23 17:33:03 UTC
I think this file is not created by the rhc client tool but instead by the 'snapshot' command that runs on node to create the snapshot.

Comment 2 Jhon Honce 2014-10-23 18:26:45 UTC
These files are left in place to allow scp or rsync commands to be run should the snapshot download fail.

Comment 3 Gaoyun Pei 2014-10-24 03:19:30 UTC
Hi Jhon,

I retried this test scenario on devenv_5262, the result is different from before. 
I created a new app named "appnew" from an existing app "appold".

Snapshot files generated in the old app, this is no problem.
[appold-123.dev.rhcloud.com 5449f3e905c2c7d82f000001]\> ls app-root/data/
mongodb_dump_old_db_name.txt  mysql_db_dbname  mysql_db_username       postgresql_db_dbname    postgresql_db_uuid	    postgresql_version
mongodb_dump_snapshot.tar.gz  mysql_db_host    mysql_dump_snapshot.gz  postgresql_db_username  postgresql_dump_snapshot.gz

But in the new app, we could see 3 snapshot files coming from the old app.
[appnew-123.dev.rhcloud.com 5449f4c405c2c7d82f00001f]\> ls app-root/data/
mongodb_dump_old_db_name.txt  mongodb_dump_snapshot.tar.gz  postgresql_db_uuid
[appnew-123.dev.rhcloud.com 5449f4c405c2c7d82f00001f]\> cat app-root/data/postgresql_db_uuid

Strictly speaking, this would not affect the app. But I'd like to suggest it's better to remove these confusing files after creation. 


Comment 4 Eric Paris 2017-05-31 18:22:11 UTC
We apologize, however, we do not plan to address this report at this time. The majority of our active development is for the v3 version of OpenShift. If you would like for Red Hat to reconsider this decision, please reach out to your support representative. We are very sorry for any inconvenience this may cause.

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