Alon Bar-Lev has posted comments on this change. Change subject: packaging: Added generic DB validations before the upgrade ......................................................................
Patch Set 14: Looks good to me, but someone else must approve (2 inline comments) Looks good! .................................................... File backend/manager/tools/dbutils/fkvalidator.sh Line 36: printf "\t-u USERNAME - The admin username for the database.\n" Line 37: printf "\t-l LOGFILE - The logfile for capturing output (def. ${LOGFILE})\n" Line 38: printf "\t-f - Fix the non consistent data by removing it from DB.\n" Line 39: printf "\t-v - Turn on verbosity (WARNING: lots of output)\n" Line 40: printf "\t-q - Run in a batch mode (don't ask questions) \n" no space at eol Line 41: printf "\t-h - This help text.\n" Line 42: printf "\n" Line 43: popd>/dev/null Line 44: exit $ret Line 57: local fix_it=${1} Line 58: if [ "${fix_it}" = "true" ]; then Line 59: CMD="copy (select fk_violation from fn_db_validate_fks(${fix_it})) to stdout;" Line 60: else Line 61: CMD="copy (select fk_violation,fk_status from fn_db_validate_fks(${fix_it}) where fk_status=1) to stdout with csv;" Can be hardcoded instead of ${fix_it}, but not that important Line 62: fi Line 63: res="$(psql -w --pset=tuples_only=on --set ON_ERROR_STOP=1 -U ${USERNAME} -c "${CMD}" -h "${SERVERNAME}" -p "${PORT}" "${DATABASE}")" Line 64: exit_code=$? Line 65: -- 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: 14 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