Merge "Remove repeated WaitConditionHandle resource"

This commit is contained in:
Jenkins 2016-07-26 11:37:31 +00:00 committed by Gerrit Code Review
commit 2304c4babb
5 changed files with 12 additions and 38 deletions

View File

@ -26,8 +26,6 @@ write_files:
ETCD_SERVER_IP="$ETCD_SERVER_IP"
API_IP_ADDRESS="$API_IP_ADDRESS"
SWARM_VERSION="$SWARM_VERSION"
AGENT_WAIT_HANDLE_ENDPOINT="$AGENT_WAIT_HANDLE_ENDPOINT"
AGENT_WAIT_HANDLE_TOKEN="$AGENT_WAIT_HANDLE_TOKEN"
TRUSTEE_USER_ID="$TRUSTEE_USER_ID"
TRUSTEE_PASSWORD="$TRUSTEE_PASSWORD"
TRUST_ID="$TRUST_ID"

View File

@ -22,8 +22,6 @@ write_files:
ETCD_SERVER_IP="$ETCD_SERVER_IP"
API_IP_ADDRESS="$API_IP_ADDRESS"
SWARM_VERSION="$SWARM_VERSION"
AGENT_WAIT_HANDLE_ENDPOINT="$AGENT_WAIT_HANDLE_ENDPOINT"
AGENT_WAIT_HANDLE_TOKEN="$AGENT_WAIT_HANDLE_TOKEN"
TRUSTEE_DOMAIN_ID="$TRUSTEE_DOMAIN_ID"
TRUSTEE_USER_ID="$TRUSTEE_USER_ID"
TRUSTEE_USERNAME="$TRUSTEE_USERNAME"

View File

@ -50,9 +50,9 @@ do
sleep 5
done
curl -i -X POST -H 'Content-Type: application/json' -H 'X-Auth-Token: $AGENT_WAIT_HANDLE_TOKEN' \
curl -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"}'"'" \
"$AGENT_WAIT_HANDLE_ENDPOINT"
"$WAIT_HANDLE_ENDPOINT"
EOF
chown root:root $SCRIPT

View File

@ -145,16 +145,6 @@ parameters:
resources:
cloud_init_wait_handle:
type: "OS::Heat::WaitConditionHandle"
cloud_init_wait_condition:
type: "OS::Heat::WaitCondition"
depends_on: swarm_master
properties:
handle: {get_resource: cloud_init_wait_handle}
timeout: 6000
master_wait_handle:
type: "OS::Heat::WaitConditionHandle"
@ -198,8 +188,8 @@ resources:
str_replace:
template: {get_file: fragments/write-heat-params-master.yaml}
params:
"$WAIT_HANDLE_ENDPOINT": {get_attr: [cloud_init_wait_handle, endpoint]}
"$WAIT_HANDLE_TOKEN": {get_attr: [cloud_init_wait_handle, token]}
"$WAIT_HANDLE_ENDPOINT": {get_attr: [master_wait_handle, endpoint]}
"$WAIT_HANDLE_TOKEN": {get_attr: [master_wait_handle, token]}
"$WAIT_CURL": {get_attr: [master_wait_handle, curl_cli]}
"$DOCKER_VOLUME": {get_resource: docker_volume}
"$DOCKER_STORAGE_DRIVER": {get_param: docker_storage_driver}

View File

@ -151,24 +151,14 @@ parameters:
resources:
node_cloud_init_wait_handle:
node_wait_handle:
type: "OS::Heat::WaitConditionHandle"
node_cloud_init_wait_condition:
node_wait_condition:
type: "OS::Heat::WaitCondition"
depends_on: swarm_node
properties:
handle: {get_resource: node_cloud_init_wait_handle}
timeout: 6000
node_agent_wait_handle:
type: "OS::Heat::WaitConditionHandle"
node_agent_wait_condition:
type: "OS::Heat::WaitCondition"
depends_on: swarm_node
properties:
handle: {get_resource: node_agent_wait_handle}
handle: {get_resource: node_wait_handle}
timeout: 6000
######################################################################
@ -183,8 +173,9 @@ resources:
str_replace:
template: {get_file: fragments/write-heat-params-node.yaml}
params:
"$WAIT_HANDLE_ENDPOINT": {get_attr: [node_cloud_init_wait_handle, endpoint]}
"$WAIT_HANDLE_TOKEN": {get_attr: [node_cloud_init_wait_handle, token]}
"$WAIT_HANDLE_ENDPOINT": {get_attr: [node_wait_handle, endpoint]}
"$WAIT_HANDLE_TOKEN": {get_attr: [node_wait_handle, token]}
"$WAIT_CURL": {get_attr: [node_wait_handle, curl_cli]}
"$DOCKER_VOLUME": {get_resource: docker_volume}
"$DOCKER_STORAGE_DRIVER": {get_param: docker_storage_driver}
"$HTTP_PROXY": {get_param: http_proxy}
@ -199,9 +190,6 @@ resources:
"$ETCD_SERVER_IP": {get_param: etcd_server_ip}
"$API_IP_ADDRESS": {get_param: api_ip_address}
"$SWARM_VERSION": {get_param: swarm_version}
"$AGENT_WAIT_HANDLE_ENDPOINT": {get_attr: [node_agent_wait_handle, endpoint]}
"$AGENT_WAIT_HANDLE_TOKEN": {get_attr: [node_agent_wait_handle, token]}
"$WAIT_CURL": {get_attr: [node_agent_wait_handle, curl_cli]}
"$TRUSTEE_DOMAIN_ID": {get_param: trustee_domain_id}
"$TRUSTEE_USER_ID": {get_param: trustee_user_id}
"$TRUSTEE_USERNAME": {get_param: trustee_username}
@ -270,8 +258,8 @@ resources:
template: {get_file: fragments/write-bay-failure-service.yaml}
params:
"$SERVICE": swarm-agent
"$WAIT_HANDLE_ENDPOINT": {get_attr: [node_agent_wait_handle, endpoint]}
"$WAIT_HANDLE_TOKEN": {get_attr: [node_agent_wait_handle, token]}
"$WAIT_HANDLE_ENDPOINT": {get_attr: [node_wait_handle, endpoint]}
"$WAIT_HANDLE_TOKEN": {get_attr: [node_wait_handle, token]}
write_swarm_agent_service:
type: "OS::Heat::SoftwareConfig"