Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1065921 - [restore.sh] restore.sh still makes files in /usr - .engine.scripts.md5
Summary: [restore.sh] restore.sh still makes files in /usr - .engine.scripts.md5
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: 3.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 3.4.0
Assignee: Eli Mesika
QA Contact: bugs@ovirt.org
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-17 09:50 UTC by Jiri Belka
Modified: 2014-02-23 15:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-23 15:11:29 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Jiri Belka 2014-02-17 09:50:54 UTC
Description of problem:
While verifying BZ1030834 I discovered restore.sh still creates files in /usr.

Comparison before and after running restore.sh:

[root@jb-rh34 dbscripts]# diff -uNp /tmp/usr.log /tmp/usr.new.log                                                                                
--- /tmp/usr.log        2014-02-17 10:29:07.767483022 +0100
+++ /tmp/usr.new.log    2014-02-17 10:43:38.299888947 +0100
@@ -15551,6 +15551,7 @@
 /usr/share/ovirt-engine/dbscripts/business_entity_snapshot_sp.sql
 /usr/share/ovirt-engine/dbscripts/multi_level_administration_sp.sql
 /usr/share/ovirt-engine/dbscripts/network_sp.sql
+/usr/share/ovirt-engine/dbscripts/.engine.scripts.md5
 /usr/share/ovirt-engine/dbscripts/network_qos_sp.sql
 /usr/share/ovirt-engine/dbscripts/gluster_server_sp.sql
 /usr/share/ovirt-engine/dbscripts/vds_groups_sp.sql

Version-Release number of selected component (if applicable):
ovirt-engine-dbscripts-3.4.0-0.7.beta2.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. make DB backup (old style - backup.sh), drop DB, find /usr | tee /tmp/usr.orig
2. su - postgres -c "psql -d template1 -c 'create database engine owner engine;'
3. PGPASSWORD=$dbpass ./restore.sh -u engine -d engine -f /root/db-backup.sql (I had to change pg_hba.conf to make it running)
4. find /usr | tee /tmp/usr.new
5. diff -uNp /tmp/usr.{new,orig}

Actual results:
/usr/share/ovirt-engine/dbscripts/.engine.scripts.md5 (created by restore.sh)

Expected results:
do not touch /usr, if needed put in /var/lib/ovirt-engine or /var/cache/ovirt-engine if it can be removed during reboot

Additional info:

Comment 1 Jiri Belka 2014-02-17 09:51:44 UTC
There's new engine-backup so maybe a solution would be to drop restore.sh/backup.sh completely :)

Comment 2 Eli Mesika 2014-02-18 20:53:00 UTC
Alon, is it OK to drop backup.sh restore.sh from dbscripts ?

Comment 3 Alon Bar-Lev 2014-02-18 20:57:10 UTC
(In reply to Eli Mesika from comment #2)
> Alon, is it OK to drop backup.sh restore.sh from dbscripts ?

sure.

Consider the following, as I do not see they are used:

packaging/dbscripts/backup.sh
packaging/dbscripts/restore.sh
packaging/dbscripts/create_db.sh
packaging/dbscripts/cleandb.sh
packaging/dbscripts/exportDbSchema.sh
packaging/dbscripts/refreshStoredProcedures.sh
packaging/dbscripts/encryptionvalidator.sh
packaging/dbscripts/unlock_entity.sh

Comment 4 Eli Mesika 2014-02-18 21:23:58 UTC
(In reply to Alon Bar-Lev from comment #3)
> (In reply to Eli Mesika from comment #2)
> > Alon, is it OK to drop backup.sh restore.sh from dbscripts ?
> 
> sure.
> 
> Consider the following, as I do not see they are used:
> 
> packaging/dbscripts/backup.sh
> packaging/dbscripts/restore.sh

OK

> packaging/dbscripts/create_db.sh
> packaging/dbscripts/cleandb.sh
> packaging/dbscripts/exportDbSchema.sh
> packaging/dbscripts/refreshStoredProcedures.sh
> packaging/dbscripts/encryptionvalidator.sh
> packaging/dbscripts/unlock_entity.sh

Some of them are used by the support team ....will check

Comment 5 Eli Mesika 2014-02-23 15:11:29 UTC
backup.sh and restore.sh are obsolete , please use engine-backup


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