Merge "Use UUID instead of "00000" for UniqueId"
This commit is contained in:
commit
25aa5b06ff
|
@ -7,8 +7,9 @@ echo "notifying heat"
|
||||||
STATUS="SUCCESS"
|
STATUS="SUCCESS"
|
||||||
REASON="Setup complete"
|
REASON="Setup complete"
|
||||||
DATA="OK"
|
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" \
|
curl -k -i -X POST -H "Content-Type: application/json" -H "X-Auth-Token: $WAIT_HANDLE_TOKEN" \
|
||||||
--data-binary "'$data'" \
|
--data-binary "'$data'" \
|
||||||
|
|
|
@ -11,6 +11,7 @@ write_files:
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
TimeoutStartSec=0
|
TimeoutStartSec=0
|
||||||
|
UUID=`uuidgen`
|
||||||
ExecStart=/usr/bin/curl -k -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $WAIT_HANDLE_TOKEN' \
|
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"
|
"$WAIT_HANDLE_ENDPOINT"
|
||||||
|
|
|
@ -75,8 +75,9 @@ do
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
UUID=`uuidgen`
|
||||||
curl -k -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $WAIT_HANDLE_TOKEN' \
|
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"
|
"$WAIT_HANDLE_ENDPOINT"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -41,12 +41,13 @@ END_TLS
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
UUID=`uuidgen`
|
||||||
cat >> /etc/systemd/system/swarm-manager.service << END_SERVICE_BOTTOM
|
cat >> /etc/systemd/system/swarm-manager.service << END_SERVICE_BOTTOM
|
||||||
etcd://$ETCD_SERVER_IP:2379/v2/keys/swarm/
|
etcd://$ETCD_SERVER_IP:2379/v2/keys/swarm/
|
||||||
ExecStop=/usr/bin/docker stop swarm-manager
|
ExecStop=/usr/bin/docker stop swarm-manager
|
||||||
Restart=always
|
Restart=always
|
||||||
ExecStartPost=/usr/bin/curl -k -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $WAIT_HANDLE_TOKEN' \\
|
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"
|
"$WAIT_HANDLE_ENDPOINT"
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
Loading…
Reference in New Issue