This patch,
1. Binds Marconi to SERVICE_HOST, to be consistent with other services.
2. Adds a health check to verify if marconi started correctly.
Change-Id: I1d48d0e610369cc97d479a5cd47b2bd11656da3f
| ... | ... |
@@ -51,6 +51,11 @@ MARCONI_BRANCH=${MARCONI_BRANCH:-master}
|
| 51 | 51 |
MARCONICLIENT_REPO=${MARCONICLIENT_REPO:-${GIT_BASE}/openstack/python-marconiclient.git}
|
| 52 | 52 |
MARCONICLIENT_BRANCH=${MARCONICLIENT_BRANCH:-master}
|
| 53 | 53 |
|
| 54 |
+# Set Marconi Connection Info |
|
| 55 |
+MARCONI_SERVICE_HOST=${MARCONI_SERVICE_HOST:-$SERVICE_HOST}
|
|
| 56 |
+MARCONI_SERVICE_PORT=${MARCONI_SERVICE_PORT:-8888}
|
|
| 57 |
+MARCONI_SERVICE_PROTOCOL=${MARCONI_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
|
| 58 |
+ |
|
| 54 | 59 |
# Tell Tempest this project is present |
| 55 | 60 |
TEMPEST_SERVICES+=,marconi |
| 56 | 61 |
|
| ... | ... |
@@ -89,7 +94,7 @@ function configure_marconi() {
|
| 89 | 89 |
sudo chown $USER $MARCONI_API_LOG_DIR |
| 90 | 90 |
|
| 91 | 91 |
iniset $MARCONI_CONF DEFAULT verbose True |
| 92 |
- iniset $MARCONI_CONF 'drivers:transport:wsgi' bind '0.0.0.0' |
|
| 92 |
+ iniset $MARCONI_CONF 'drivers:transport:wsgi' bind $MARCONI_SERVICE_HOST |
|
| 93 | 93 |
|
| 94 | 94 |
iniset $MARCONI_CONF keystone_authtoken auth_protocol http |
| 95 | 95 |
iniset $MARCONI_CONF keystone_authtoken admin_user marconi |
| ... | ... |
@@ -142,6 +147,10 @@ function install_marconiclient() {
|
| 142 | 142 |
# start_marconi() - Start running processes, including screen |
| 143 | 143 |
function start_marconi() {
|
| 144 | 144 |
screen_it marconi-server "marconi-server --config-file $MARCONI_CONF" |
| 145 |
+ echo "Waiting for Marconi to start..." |
|
| 146 |
+ if ! timeout $SERVICE_TIMEOUT sh -c "while ! wget --no-proxy -q -O- $MARCONI_SERVICE_PROTOCOL://$MARCONI_SERVICE_HOST:$MARCONI_SERVICE_PORT/v1/health; do sleep 1; done"; then |
|
| 147 |
+ die $LINENO "Marconi did not start" |
|
| 148 |
+ fi |
|
| 145 | 149 |
} |
| 146 | 150 |
|
| 147 | 151 |
# stop_marconi() - Stop running processes |
| ... | ... |
@@ -176,9 +185,9 @@ function create_marconi_accounts() {
|
| 176 | 176 |
openstack endpoint create \ |
| 177 | 177 |
$MARCONI_SERVICE \ |
| 178 | 178 |
--region RegionOne \ |
| 179 |
- --publicurl "http://$SERVICE_HOST:8888" \ |
|
| 180 |
- --adminurl "http://$SERVICE_HOST:8888" \ |
|
| 181 |
- --internalurl "http://$SERVICE_HOST:8888" |
|
| 179 |
+ --publicurl "$MARCONI_SERVICE_PROTOCOL://$MARCONI_SERVICE_HOST:$MARCONI_SERVICE_PORT" \ |
|
| 180 |
+ --adminurl "$MARCONI_SERVICE_PROTOCOL://$MARCONI_SERVICE_HOST:$MARCONI_SERVICE_PORT" \ |
|
| 181 |
+ --internalurl "$MARCONI_SERVICE_PROTOCOL://$MARCONI_SERVICE_HOST:$MARCONI_SERVICE_PORT" |
|
| 182 | 182 |
fi |
| 183 | 183 |
|
| 184 | 184 |
} |