Merge "Always use volume v1 API for type create."
diff --git a/lib/keystone b/lib/keystone
index 428e615..59584b2 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -313,6 +313,8 @@
iniset $KEYSTONE_CONF eventlet_server admin_workers "$API_WORKERS"
# Public workers will use the server default, typically number of CPU.
+
+ iniset $KEYSTONE_CONF fernet_tokens key_repository "$KEYSTONE_CONF_DIR/fernet-keys/"
}
function configure_keystone_extensions {
@@ -475,11 +477,15 @@
$KEYSTONE_BIN_DIR/keystone-manage db_sync --extension "${extension_value}"
done
- if [[ "$KEYSTONE_TOKEN_FORMAT" != "uuid" ]]; then
+ if [[ "$KEYSTONE_TOKEN_FORMAT" == "pki" || "$KEYSTONE_TOKEN_FORMAT" == "pkiz" ]]; then
# Set up certificates
rm -rf $KEYSTONE_CONF_DIR/ssl
$KEYSTONE_BIN_DIR/keystone-manage pki_setup
fi
+ if [[ "$KEYSTONE_TOKEN_FORMAT" == "fernet" ]]; then
+ rm -rf "$KEYSTONE_CONF_DIR/fernet-keys/"
+ $KEYSTONE_BIN_DIR/keystone-manage fernet_setup
+ fi
}
# install_keystoneclient() - Collect source and prepare
diff --git a/tests/test_worlddump.sh b/tests/test_worlddump.sh
new file mode 100755
index 0000000..f407d40
--- /dev/null
+++ b/tests/test_worlddump.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Simple test of worlddump.py
+
+TOP=$(cd $(dirname "$0")/.. && pwd)
+
+source $TOP/tests/unittest.sh
+
+OUT_DIR=$(mktemp -d)
+
+$TOP/tools/worlddump.py -d $OUT_DIR
+
+if [[ $? -ne 0 ]]; then
+ fail "worlddump failed"
+else
+
+ # worlddump creates just one output file
+ OUT_FILE=($OUT_DIR/*.txt)
+
+ if [ ! -r $OUT_FILE ]; then
+ failed "worlddump output not seen"
+ else
+ passed "worlddump output $OUT_FILE"
+
+ if [[ $(stat -c %s $OUT_DIR/*.txt) -gt 0 ]]; then
+ passed "worlddump output is not zero sized"
+ fi
+
+ # put more extensive examination here, if required.
+ fi
+fi
+
+rm -rf $OUT_DIR
+
+report_results
diff --git a/tools/worlddump.py b/tools/worlddump.py
index 628a69f..e4ba02b 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -21,9 +21,9 @@
import fnmatch
import os
import os.path
+import subprocess
import sys
-from subprocess import Popen
def get_options():
parser = argparse.ArgumentParser(
@@ -47,7 +47,10 @@
print cmd
print "-" * len(cmd)
print
- Popen(cmd, shell=True)
+ try:
+ subprocess.check_call(cmd, shell=True)
+ except subprocess.CalledProcessError:
+ print "*** Failed to run: %s" % cmd
def _header(name):
@@ -109,6 +112,13 @@
def guru_meditation_report():
_header("nova-compute Guru Meditation Report")
+
+ try:
+ subprocess.check_call(["pgrep","nova-compute"])
+ except subprocess.CalledProcessError:
+ print "Skipping as nova-compute does not appear to be running"
+ return
+
_dump_cmd("kill -s USR1 `pgrep nova-compute`")
print "guru meditation report in nova-compute log"