Alon Bar-Lev has posted comments on this change.

Change subject: core: rhevm-upgrade creates log/helping files...
......................................................................


Patch Set 2: (3 inline comments)

I can help cleaning up the database scripts... move away from bash, use proper 
quoting, cleanups, work in any working directory and more... :)

....................................................
File backend/manager/dbscripts/create_schema.sh
Line 60: #inserting initial data
Line 61: insert_initial_data
Line 62: 
Line 63: #remove checksum file in clean install in order to run views/sp 
creation
Line 64: rm -f ${MD5DIR}/.${DATABASE}.scripts.md5 >& /dev/null
Use trap to cleanup temporary files?

At prologue of script, put:

 cleanup() {
     [ -n "${MD5DIR}" ] && rm -fr "${MD5DIR}"
 }
 trap cleanup 0
Line 65: 
Line 66: # Running upgrade scripts
Line 67: printf "Running upgrade scripts...\n"
Line 68: run_upgrade_files


....................................................
File backend/manager/dbscripts/dbcustomfunctions.sh
Line 28:     fi
Line 29:     export PGPASSFILE
Line 30:     # Setting *.md5 generated files dir
Line 31:     MD5DIR="$(mktemp -d)"
Line 32:     if [ ! -d "${MD5DIR}" ]; then
MD5DIR is always created if mktemp succeeds. If not you will not succeed either.
Line 33:         mkdir -p ${MD5DIR}
Line 34:     fi
Line 35:     # Setting log files dir
Line 36:     LOGDIR="/var/log/ovirt-engine/db"


Line 32:     if [ ! -d "${MD5DIR}" ]; then
Line 33:         mkdir -p ${MD5DIR}
Line 34:     fi
Line 35:     # Setting log files dir
Line 36:     LOGDIR="/var/log/ovirt-engine/db"
I think default logs should be in /tmp as well, so developers do not have 
permissions issue, while engine-setup/engine-upgrade will set this to this 
location.
Line 37:     LOGFILE="${LOGDIR}/${ME}.log"
Line 38:     if [ ! -d "${LOGDIR}" ]; then
Line 39:         mkdir -p ${LOGDIR}
Line 40:     fi


--
To view, visit http://gerrit.ovirt.org/14090
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id89c6d9267a7f739bc3584ab3a59888cece50fb7
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to