Browse code

Merge "Add new parameter RECREATE_KEYSTONE_DB"

Jenkins authored on 2016/12/23 04:25:40
Showing 2 changed files
... ...
@@ -490,8 +490,10 @@ function init_keystone {
490 490
         init_ldap
491 491
     fi
492 492
 
493
-    # (Re)create keystone database
494
-    recreate_database keystone
493
+    if [[ "$RECREATE_KEYSTONE_DB" == True ]]; then
494
+        # (Re)create keystone database
495
+        recreate_database keystone
496
+    fi
495 497
 
496 498
     # Initialize keystone database
497 499
     $KEYSTONE_BIN_DIR/keystone-manage --config-file $KEYSTONE_CONF db_sync
... ...
@@ -819,6 +819,10 @@ GIT_DEPTH=${GIT_DEPTH:-0}
819 819
 # Use native SSL for servers in ``SSL_ENABLED_SERVICES``
820 820
 USE_SSL=$(trueorfalse False USE_SSL)
821 821
 
822
+# We may not need to recreate database in case 2 Keystone services
823
+# sharing the same database. It would be useful for multinode Grenade tests.
824
+RECREATE_KEYSTONE_DB=$(trueorfalse True RECREATE_KEYSTONE_DB)
825
+
822 826
 # ebtables is inherently racey. If you run it by two or more processes
823 827
 # simultaneously it will collide, badly, in the kernel and produce
824 828
 # failures or corruption of ebtables. The only way around it is for