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 Line 2: Line 3: #include db general functions Line 4: pushd $(dirname ${0})>/dev/null Line 5: source ./common.sh We do not need this... you get all information from parameters anyway. We do, however, need ENGINE_PGPASS environment to override the PGPASSFILE environment, like in other database scripts. Line 6: Line 7: usage() { Line 8: printf "Usage: ${ME} [-s SERVERNAME [-p PORT]] [-d DATABASE] [-u USERNAME]\n" Line 9: printf "\n" Line 25: esac Line 26: done Line 27: Line 28: validationlist=( Line 29: fkvalidator.sh Add ./ here, clearer than having it when executing. Line 30: ) Line 31: Line 32: for script in ${validationlist}; do Line 33: out=`./${script} -u ${USERNAME} -h ${SERVERNAME} -p ${PORT} -d ${DATABASE}` Line 41: echo " ====== Running ${script} ====== " Line 42: echo ${out} Line 43: echo "" Line 44: Line 45: ./${script} -u ${USERNAME} -h ${SERVERNAME} -p ${PORT} -d ${DATABASE} -f > /dev/null log? Line 46: rc=$? Line 47: if [[ ${rc} > 0 ]]; then Line 48: exit ${rc} Line 49: fi Line 42: echo ${out} Line 43: echo "" Line 44: Line 45: ./${script} -u ${USERNAME} -h ${SERVERNAME} -p ${PORT} -d ${DATABASE} -f > /dev/null Line 46: rc=$? no need for rc... "${script}" .... || die 'error' And have die function... Line 47: if [[ ${rc} > 0 ]]; then Line 48: exit ${rc} Line 49: fi Line 50: fi -- 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