summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xturbo_hipster/lib/gerrit-git-prep.sh4
-rwxr-xr-xturbo_hipster/task_plugins/real_db_upgrade/baseline.sh11
-rwxr-xr-xturbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh18
-rw-r--r--turbo_hipster/task_plugins/real_db_upgrade/task.py8
4 files changed, 20 insertions, 21 deletions
diff --git a/turbo_hipster/lib/gerrit-git-prep.sh b/turbo_hipster/lib/gerrit-git-prep.sh
index 1b9e546..5636241 100755
--- a/turbo_hipster/lib/gerrit-git-prep.sh
+++ b/turbo_hipster/lib/gerrit-git-prep.sh
@@ -97,3 +97,7 @@ then
git submodule sync
git submodule update --init
fi
+
+# Added for turbo-hipster
+git branch -D working || true
+git checkout -b working
diff --git a/turbo_hipster/task_plugins/real_db_upgrade/baseline.sh b/turbo_hipster/task_plugins/real_db_upgrade/baseline.sh
deleted file mode 100755
index 0646929..0000000
--- a/turbo_hipster/task_plugins/real_db_upgrade/baseline.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# Generate a baseline measure of the performance of an instance
-
-# $1 is a string descript of the instance flavor
-
-echo "Instance flavor: $1"
-echo "IO test starts"
-time dd if=/dev/zero bs=1024000 count=1024 of=/tmp/test-$$.dd
-rm -f /tmp/test-$$.dd
-echo "IO test ends"
diff --git a/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh b/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh
index 73ea63c..1876012 100755
--- a/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh
+++ b/turbo_hipster/task_plugins/real_db_upgrade/nova_mysql_migrations.sh
@@ -134,7 +134,7 @@ stable_release_db_sync() {
# Some databases are from Folsom
echo "Schema version is $version"
- if [ $version == "133" ] # I think this should be [ $version lt "133" ]
+ if [ $version -le "133" ]
then
echo "Database is from Folsom! Upgrade via Grizzly"
git branch -D stable/grizzly || true
@@ -148,7 +148,7 @@ stable_release_db_sync() {
version=`mysql -u $3 --password=$4 $5 -e "select * from migrate_version \G" | grep version | sed 's/.*: //'`
# Some databases are from Grizzly
echo "Schema version is $version"
- if [ $version == "161" ] # I think this should be [ $version lt "161" ]
+ if [ $version -le "161" ]
then
echo "Database is from Grizzly! Upgrade via Havana"
git branch -D stable/havana || true
@@ -158,6 +158,20 @@ stable_release_db_sync() {
pip_requires
db_sync "havana" $1 $2 $3 $4 $5 $6
fi
+
+ version=`mysql -u $3 --password=$4 $5 -e "select * from migrate_version \G" | grep version | sed 's/.*: //'`
+ # Some databases are from Havana
+ echo "Schema version is $version"
+ if [ $version -le "216" ]
+ then
+ echo "Database is from Grizzly! Upgrade via Icehouse"
+ git branch -D stable/icehouse || true
+ git remote update
+ git checkout -b stable/icehouse
+ git reset --hard remotes/origin/stable/icehouse
+ pip_requires
+ db_sync "icehouse" $1 $2 $3 $4 $5 $6
+ fi
}
echo "Test running on "`hostname`" as "`whoami`" ("`echo ~`", $HOME)"
diff --git a/turbo_hipster/task_plugins/real_db_upgrade/task.py b/turbo_hipster/task_plugins/real_db_upgrade/task.py
index 510cdee..252160a 100644
--- a/turbo_hipster/task_plugins/real_db_upgrade/task.py
+++ b/turbo_hipster/task_plugins/real_db_upgrade/task.py
@@ -161,14 +161,6 @@ class Runner(models.ShellTask):
self.log.debug("Run the db sync upgrade script")
for dataset in self.job_datasets:
- cmd = os.path.join(os.path.join(os.path.dirname(__file__),
- (self.worker_server.config['baseline_command']
- % self.worker_server.config['flavor'])))
- rc = utils.execute_to_log(
- cmd,
- dataset['job_log_file_path'],
- )
-
cmd = dataset['command']
# $1 is the unique id
# $2 is the working dir path