Eli Mesika has uploaded a new change for review. Change subject: core: upgrade si26.1 to si27 failed ......................................................................
core: upgrade si26.1 to si27 failed Patch addresses the following problem taskcleaner needs dbfunctions and dbcustomfunctions taskcleaner and dbfunctions*.sh are in dbscripts rpm, which is locked, and downloaded only AFTER we clean the tasks during upgrade. The ONLY viable option is to separate taskcleaner and its SP installing from dbscripts, and move it into the setup rpm, in that way, it will be always available. In order to do so, we need to do the following: 1. Make taskcleaner a standalone script (e.g, remove the dependency on dbfunctions) 2. Move it outside of dbscripts folder (to tools/dbutils) 3. Alter the rpm spec file to include the standalone taskcleaner in rhevm-setup rpm, and deploy it outside of dbscripts. (will be done in a separate patch) Change-Id: I82e9ccd3f621f1b524d4f7ed587fe9f266ffa8de Signed-off-by: Eli Mesika <[email protected]> --- R backend/manager/tools/dbutils/taskcleaner.sh R backend/manager/tools/dbutils/taskcleaner_sp.sql 2 files changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/17/11917/1 diff --git a/backend/manager/dbscripts/taskcleaner.sh b/backend/manager/tools/dbutils/taskcleaner.sh similarity index 97% rename from backend/manager/dbscripts/taskcleaner.sh rename to backend/manager/tools/dbutils/taskcleaner.sh index 14f2752..9bb217c 100755 --- a/backend/manager/dbscripts/taskcleaner.sh +++ b/backend/manager/tools/dbutils/taskcleaner.sh @@ -19,13 +19,14 @@ pushd $(dirname ${0})>/dev/null -#include db general functions -source ./dbfunctions.sh -source ./dbcustomfunctions.sh - #setting defaults -set_defaults - +ME=$(basename $0) +SERVERNAME="localhost" +PORT="5432" +DATABASE="engine" +USERNAME="" +VERBOSE=false +LOGFILE="$ME.log" usage() { printf "Usage: ${ME} [-h] [-s server] [-p PORT]] [-d DATABASE] [-u USERNAME] [-l LOGFILE] [-t taskId] [-c commandId] [-z] [-R] [-C] [-J] [-q] [-v]\n" @@ -103,6 +104,10 @@ fi } +# Install taskcleaner procedures +psql -U ${USERNAME} -h ${SERVERNAME} -p ${PORT} -f ./taskcleaner_sp.sql ${DATABASE} > /dev/null + + if [ "${TASK_ID}" != "" -o "${COMMAND_ID}" != "" -o "${CLEAR_ALL}" = "true" -o "${CLEAR_COMPENSATION}" = "true" -o "${CLEAR_JOB_STEPS}" = "true" ]; then #delete operations block if [ "${TASK_ID}" != "" ]; then if [ "${ZOMBIES_ONLY}" = "true" ]; then diff --git a/backend/manager/dbscripts/taskcleaner_sp.sql b/backend/manager/tools/dbutils/taskcleaner_sp.sql similarity index 100% rename from backend/manager/dbscripts/taskcleaner_sp.sql rename to backend/manager/tools/dbutils/taskcleaner_sp.sql -- To view, visit http://gerrit.ovirt.org/11917 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I82e9ccd3f621f1b524d4f7ed587fe9f266ffa8de Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
