Contrail API check script updated

Change-Id: Iace1917d610b8018b159bd21b9242bdb8e5e2a2d
Closes-bug: #1603959
Signed-off-by: Illia Polliul <ipolliul@mirantis.com>
This commit is contained in:
Illia Polliul
2016-07-18 16:32:20 +03:00
parent 69c8e43a0d
commit af39b69265
5 changed files with 10 additions and 10 deletions

View File

@@ -22,8 +22,8 @@ class contrail::provision::analytics {
notify {'Waiting for contrail API':} ->
exec {'wait_for_api':
command => "if ! [[ `curl --silent --output /dev/null --write-out \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082` =~ ^(200|401)$ ]];\
then exit 1; fi",
command => "bash -c 'if ! [[ $(curl -s -o /dev/null -w \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082) =~ ^(200|401)$ ]];\
then exit 1; fi'",
tries => 10,
try_sleep => 10,
} ->

View File

@@ -26,8 +26,8 @@ class contrail::provision::compute {
content => template('contrail/vnc_api_lib.ini.erb')
} ->
exec {'wait_for_api':
command => "if ! [[ `curl --silent --output /dev/null --write-out \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082` =~ ^(200|401)$ ]];\
then exit 1; fi",
command => "bash -c 'if ! [[ $(curl -s -o /dev/null -w \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082) =~ ^(200|401)$ ]];\
then exit 1; fi'",
tries => 10,
try_sleep => 10,
} ->

View File

@@ -22,8 +22,8 @@ class contrail::provision::config {
notify {'Waiting for contrail API':} ->
exec {'wait_for_api':
command => "if ! [[ `curl --silent --output /dev/null --write-out \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082` =~ ^(200|401)$ ]];\
then exit 1; fi",
command => "bash -c 'if ! [[ $(curl -s -o /dev/null -w \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082) =~ ^(200|401)$ ]];\
then exit 1; fi'",
tries => 10,
try_sleep => 10,
} ->

View File

@@ -47,8 +47,8 @@ class contrail::provision::control {
notify {'Waiting for contrail API':} ->
exec {'wait_for_api':
command => "if ! [[ `curl --silent --output /dev/null --write-out \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082` =~ ^(200|401)$ ]];\
then exit 1; fi",
command => "bash -c 'if ! [[ $(curl -s -o /dev/null -w \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082) =~ ^(200|401)$ ]];\
then exit 1; fi'",
tries => 10,
try_sleep => 10,
}

View File

@@ -27,8 +27,8 @@ class contrail::provision::db {
notify {'Waiting for contrail API':} ->
exec {'wait_for_api':
command => "if ! [[ `curl --silent --output /dev/null --write-out \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082` =~ ^(200|401)$ ]];\
then exit 1; fi",
command => "bash -c 'if ! [[ $(curl -s -o /dev/null -w \"%{http_code}\" http://${contrail::contrail_mgmt_vip}:8082) =~ ^(200|401)$ ]];\
then exit 1; fi'",
tries => 10,
try_sleep => 10,
} ->