Merge "Use lowercase keys for swarm waitcondition signal"
This commit is contained in:
commit
e6da7152ab
|
@ -9,8 +9,8 @@ REASON="Setup complete"
|
|||
DATA="OK"
|
||||
UUID=`uuidgen`
|
||||
|
||||
data=$(echo '{"Status": "'${STATUS}'", "Reason": "'$REASON'", "Data": "'${DATA}'", "Id": "'$UUID'"}')
|
||||
data=$(echo '{"status": "'${STATUS}'", "reason": "'$REASON'", "data": "'${DATA}'", "id": "'$UUID'"}')
|
||||
|
||||
curl -k -i -X POST -H "Content-Type: application/json" -H "X-Auth-Token: $WAIT_HANDLE_TOKEN" \
|
||||
--data-binary "'$data'" \
|
||||
--data-binary "$data" \
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
|
|
|
@ -11,7 +11,6 @@ write_files:
|
|||
[Service]
|
||||
Type=simple
|
||||
TimeoutStartSec=0
|
||||
UUID=`uuidgen`
|
||||
ExecStart=/usr/bin/curl -k -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $WAIT_HANDLE_TOKEN' \
|
||||
--data-binary "'"'{"Status": "FAILURE", "Reason": "$SERVICE service failed to start.", "Data": "Failure", "Id": "$UUID"}'"'" \
|
||||
--data-binary '{"status": "FAILURE", "reason": "$SERVICE service failed to start.", "data": "Failure"}' \
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
|
|
|
@ -67,6 +67,7 @@ chmod 644 $CONF_FILE
|
|||
|
||||
SCRIPT=/usr/local/bin/notify-heat
|
||||
|
||||
UUID=`uuidgen`
|
||||
cat > $SCRIPT << EOF
|
||||
#!/bin/sh
|
||||
until etcdctl \
|
||||
|
@ -79,9 +80,8 @@ do
|
|||
sleep 5
|
||||
done
|
||||
|
||||
UUID=`uuidgen`
|
||||
curl -k -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $WAIT_HANDLE_TOKEN' \
|
||||
--data-binary "'"'{"Status": "SUCCESS", "Reason": "Swarm agent ready", "Data": "OK", "Id": "'${UUID}'"}'"'" \
|
||||
--data-binary '{"status": "SUCCESS", "reason": "Swarm agent ready", "data": "OK", "id": "${UUID}"}' \
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
EOF
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ cat >> /etc/systemd/system/swarm-manager.service << END_SERVICE_BOTTOM
|
|||
ExecStop=/usr/bin/docker stop swarm-manager
|
||||
Restart=always
|
||||
ExecStartPost=/usr/bin/curl -k -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $WAIT_HANDLE_TOKEN' \\
|
||||
--data-binary "'"'{"Status": "SUCCESS", "Reason": "Setup complete", "Data": "OK", "Id": "$UUID"}'"'" \\
|
||||
--data-binary '{"status": "SUCCESS", "reason": "Setup complete", "data": "OK", "id": "$UUID"}' \\
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
|
||||
[Install]
|
||||
|
|
Loading…
Reference in New Issue