add debug to S3 repository creation in elasticsearch image

This commit is contained in:
AlfonsoRBJ
2019-09-03 11:15:35 +02:00
parent 901c29c3ab
commit 0c571ad3f9
2 changed files with 15 additions and 12 deletions
+9 -9
View File
@@ -76,15 +76,15 @@ function CreateRepo()
repository="$repository_name-$version"
s3_path="$path/$version"
curl ${auth} -X PUT "$elastic_ip_port/_snapshot/$repository" -H 'Content-Type: application/json' -d'
{
"type": "s3",
"settings": {
"bucket": "'$bucket_name'",
"base_path": "'$s3_path'"
}
}
'
>&2 echo "Create S3 repository"
until curl ${auth} -X PUT "$elastic_ip_port/_snapshot/$repository" -H 'Content-Type: application/json' -d' {"type": "s3", "settings": { "bucket": "'$bucket_name'", "base_path": "'$s3_path'"} }'; do
>&2 echo "Elastic is unavailable, S3 repository not created - sleeping"
sleep 5
done
>&2 echo "S3 repository created"
}