Alon Bar-Lev has posted comments on this change.

Change subject: packaging: Added generic DB validations before the upgrade
......................................................................


Patch Set 10: (4 inline comments)

....................................................
File backend/manager/tools/dbutils/validatedb.sh
Line 1: #!/bin/bash
Please don't use bash... I am trying to eliminate it...

Usage:

 cat << __EOF__
Usage: ${ME} bla bla
bla bla
bla bla
__EOF__

Please don't use getopts...

 while [ -n "$1" ]; do
        x="$1"
        v="${x#*=}"
        shift
        case "${x}" in
                --otopi-environment=*)
                        otopienv="${v}"
                ;;
 ...

Avoid [[]], source and arrays...

In short test using dash.
Line 2: 
Line 3: #include db general functions
Line 4: pushd $(dirname ${0})>/dev/null
Line 5: source ./common.sh


Line 1: #!/bin/bash
Line 2: 
Line 3: #include db general functions
Line 4: pushd $(dirname ${0})>/dev/null
Please avoid changing directory during script... and if you must for some 
reason, please just change the directory, no pushd, directory will revert 
anyway when exiting.
Line 5: source ./common.sh
Line 6: 
Line 7: usage() {
Line 8:     printf "Usage: ${ME} [-s SERVERNAME [-p PORT]] [-d DATABASE] [-u 
USERNAME]\n" 


Line 4: pushd $(dirname ${0})>/dev/null
Line 5: source ./common.sh
Line 6: 
Line 7: usage() {
Line 8:     printf "Usage: ${ME} [-s SERVERNAME [-p PORT]] [-d DATABASE] [-u 
USERNAME]\n" 
space...
Line 9:     printf "\n"
Line 10:     printf "\t-s SERVERNAME - The database servername for the database 
 (def. ${SERVERNAME})\n"
Line 11:     printf "\t-p PORT       - The database port for the database       
 (def. ${PORT})\n"
Line 12:     printf "\t-d DATABASE   - The database name                        
 (def. ${DATABASE})\n"


....................................................
File packaging/fedora/setup/engine-upgrade.py
Line 1071:         cmdList=cmd,
Line 1072:         failOnError=True,
Line 1073:         msg="Can't validate DB",
Line 1074:         envDict=utils.getPgEnv(),
Line 1075:     )
Where do we print messages to user? What actually is wrong?
Line 1076: 
Line 1077: def setupVarPrivileges():
Line 1078:     # previous versions mixed root/ovirt
Line 1079:     # ownership in these directories


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief0e65231bb42b569734cdd2fa6491b645491f98
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <alou...@redhat.com>
Gerrit-Reviewer: Alex Lourie <alou...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to