Add 30 seconds timeout on EC2 user data fetch

Closes #62
pull/100/head
Vlastimil Holer 7 years ago
parent 44f01e627b
commit 1ed27b1bef
No known key found for this signature in database
GPG Key ID: EB549BADEFD07C53

@ -164,7 +164,7 @@ function get_new_context {
vmtoolsd --cmd 'info-get guestinfo.opennebula.context' | \ vmtoolsd --cmd 'info-get guestinfo.opennebula.context' | \
openssl base64 -d > ${CONTEXT_NEW} openssl base64 -d > ${CONTEXT_NEW}
elif curl -s -o ${CONTEXT_NEW} http://169.254.169.254/latest/user-data; then elif curl -s -m 30 -o ${CONTEXT_NEW} http://169.254.169.254/latest/user-data; then
log debug "Reading EC2 user-data" log debug "Reading EC2 user-data"
echo -n "" echo -n ""
fi fi

Loading…
Cancel
Save