Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge "include health manager in deployer apply_spec"

  • Loading branch information...
commit 67ba02a98e5f8659b0b12f7908cb9aee6be8363c 2 parents 545271b + 3000f73
@pmenglund pmenglund authored Gerrit Code Review committed
Showing with 12 additions and 7 deletions.
  1. +12 −7 deployer/lib/deployer/instance_manager.rb
View
19 deployer/lib/deployer/instance_manager.rb
@@ -208,7 +208,7 @@ def create_stemcell(stemcell_tgz)
# override with values from the deployment manifest
override = Config.cloud_options["properties"]["stemcell"]
- properties["cloud_properties"].merge!(override) if override
+ override_property(properties, "cloud_properties", override)
step "Uploading stemcell" do
cloud.create_stemcell("#{stemcell}/image", properties["cloud_properties"])
@@ -363,6 +363,11 @@ def update_spec(spec)
update_service_address(properties, service, service_ip)
end
+ # health monitor does not listen to any ports, so there is no
+ # need to update the service address, but we still want to
+ # be able to override values in the apply_spec
+ override_property(properties, "hm", Config.spec_properties["hm"])
+
spec
end
@@ -397,9 +402,7 @@ def update_agent_service_address(properties, service, address)
svc = agent[service] ||= {}
svc["address"] = address
- if override = Config.agent_properties[service]
- svc.merge!(override)
- end
+ override_property(agent, service, Config.agent_properties[service])
end
end
@@ -407,9 +410,11 @@ def update_service_address(properties, service, address)
return unless properties[service]
properties[service]["address"] = address
- if override = Config.spec_properties[service]
- properties[service].merge!(override)
- end
+ override_property(properties, service, Config.spec_properties[service])
+ end
+
+ def override_property(properties, service, override)
+ properties[service].merge!(override) if override
end
def bosh_ip
Please sign in to comment.
Something went wrong with that request. Please try again.