Merge "Use UUID instead of "00000" for UniqueId"
This commit is contained in:
commit
25aa5b06ff
|
@ -7,8 +7,9 @@ echo "notifying heat"
|
|||
STATUS="SUCCESS"
|
||||
REASON="Setup complete"
|
||||
DATA="OK"
|
||||
UUID=`uuidgen`
|
||||
|
||||
data=$(echo '{"Status": "'${STATUS}'", "Reason": "'$REASON'", "Data": "'${DATA}'", "UniqueId": "00000"}')
|
||||
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'" \
|
||||
|
|
|
@ -11,6 +11,7 @@ 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": "OK", "UniqueId": "00000"}'"'" \
|
||||
--data-binary "'"'{"Status": "FAILURE", "Reason": "$SERVICE service failed to start.", "Data": "Failure", "Id": "$UUID"}'"'" \
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
|
|
|
@ -75,8 +75,9 @@ 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", "UniqueId": "00000"}'"'" \
|
||||
--data-binary "'"'{"Status": "SUCCESS", "Reason": "Swarm agent ready", "Data": "OK", "Id": "'${UUID}'"}'"'" \
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
EOF
|
||||
|
||||
|
|
|
@ -41,12 +41,13 @@ END_TLS
|
|||
|
||||
fi
|
||||
|
||||
UUID=`uuidgen`
|
||||
cat >> /etc/systemd/system/swarm-manager.service << END_SERVICE_BOTTOM
|
||||
etcd://$ETCD_SERVER_IP:2379/v2/keys/swarm/
|
||||
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", "UniqueId": "00000"}'"'" \\
|
||||
--data-binary "'"'{"Status": "SUCCESS", "Reason": "Setup complete", "Data": "OK", "Id": "$UUID"}'"'" \\
|
||||
"$WAIT_HANDLE_ENDPOINT"
|
||||
|
||||
[Install]
|
||||
|
|
Loading…
Reference in New Issue