When 'keystone token-get' fails, the caller can't detect the failure.
This cause troulbe shooting a bit complicated.
Change-Id: I3c58c5fd0e92a87e87546ea797904e08646a1097
Closes-Bug: #1238412
| ... | ... |
@@ -1203,6 +1203,7 @@ fi |
| 1203 | 1203 |
|
| 1204 | 1204 |
if is_service_enabled g-reg; then |
| 1205 | 1205 |
TOKEN=$(keystone token-get | grep ' id ' | get_field 2) |
| 1206 |
+ die_if_not_set $LINENO TOKEN "Keystone fail to get token" |
|
| 1206 | 1207 |
|
| 1207 | 1208 |
if is_baremetal; then |
| 1208 | 1209 |
echo_summary "Creating and uploading baremetal images" |
| ... | ... |
@@ -33,6 +33,7 @@ fi |
| 33 | 33 |
|
| 34 | 34 |
# Get a token to authenticate to glance |
| 35 | 35 |
TOKEN=$(keystone token-get | grep ' id ' | get_field 2) |
| 36 |
+die_if_not_set $LINENO TOKEN "Keystone fail to get token" |
|
| 36 | 37 |
|
| 37 | 38 |
# Glance connection info. Note the port must be specified. |
| 38 | 39 |
GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$GLANCE_HOST:9292}
|