Merge "soft-qemu handling with F20 could image"
diff --git a/files/apts/keystone b/files/apts/keystone
index 57fde80..b7218b7 100644
--- a/files/apts/keystone
+++ b/files/apts/keystone
@@ -11,3 +11,4 @@
 python-routes
 libldap2-dev
 libsasl2-dev
+libkrb5-dev
diff --git a/lib/keystone b/lib/keystone
index 69fba0f..41ed4c1 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -479,7 +479,10 @@
     fi
 
     echo "Waiting for keystone to start..."
-    if ! timeout $SERVICE_TIMEOUT sh -c "while ! curl --noproxy '*' -k -s $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$service_port/v$IDENTITY_API_VERSION/ >/dev/null; do sleep 1; done"; then
+    # Check that the keystone service is running. Even if the tls tunnel
+    # should be enabled, make sure the internal port is checked using
+    # unencryted traffic at this point.
+    if ! timeout $SERVICE_TIMEOUT sh -c "while ! curl --noproxy '*' -k -s http://$KEYSTONE_SERVICE_HOST:$service_port/v$IDENTITY_API_VERSION/ >/dev/null; do sleep 1; done"; then
         die $LINENO "keystone did not start"
     fi