With the gate upgrade to Trusty, Marconi should now be able to run with
Mongo DB at the gate.
Change-Id: I7bfe25d42c9429606ee209860685077806eb6756
... | ... |
@@ -42,7 +42,7 @@ MARCONI_AUTH_CACHE_DIR=${MARCONI_AUTH_CACHE_DIR:-/var/cache/marconi} |
42 | 42 |
MARCONI_BIN_DIR=$(get_python_exec_prefix) |
43 | 43 |
|
44 | 44 |
# Set up database backend |
45 |
-MARCONI_BACKEND=${MARCONI_BACKEND:-sqlite} |
|
45 |
+MARCONI_BACKEND=${MARCONI_BACKEND:-mongodb} |
|
46 | 46 |
|
47 | 47 |
|
48 | 48 |
# Set Marconi repository |
... | ... |
@@ -77,6 +77,13 @@ function is_marconi_enabled { |
77 | 77 |
function cleanup_marconi { |
78 | 78 |
if ! timeout $SERVICE_TIMEOUT sh -c "while ! mongo marconi --eval 'db.dropDatabase();'; do sleep 1; done"; then |
79 | 79 |
die $LINENO "Mongo DB did not start" |
80 |
+ else |
|
81 |
+ full_version=$(mongo marconi --eval 'db.dropDatabase();') |
|
82 |
+ mongo_version=`echo $full_version | cut -d' ' -f4` |
|
83 |
+ required_mongo_version='2.2' |
|
84 |
+ if [[ $mongo_version < $required_mongo_version ]]; then |
|
85 |
+ die $LINENO "Marconi needs Mongo DB version >= 2.2 to run." |
|
86 |
+ fi |
|
80 | 87 |
fi |
81 | 88 |
} |
82 | 89 |
|