Skip to content

Commit

Permalink
fix(provider/google): Fix deserialization of load balancer health for…
Browse files Browse the repository at this point in the history
… instances. (#1609)
  • Loading branch information
Matt Duftler committed May 1, 2017
1 parent bc75ad0 commit 8af0a2f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ class GoogleInstanceProvider implements InstanceProvider<GoogleInstance.View> {
def loadBalancerKeys = cacheData.relationships[LOAD_BALANCERS.ns]
if (loadBalancerKeys) {
cacheView.getAll(LOAD_BALANCERS.ns, loadBalancerKeys).each { CacheData loadBalancerCacheData ->
GoogleLoadBalancer loadBalancer = objectMapper.convertValue(loadBalancerCacheData.attributes, GoogleLoadBalancer)
def foundHealths = loadBalancer.healths.findAll { GoogleLoadBalancerHealth health ->
def foundHealths = loadBalancerCacheData.attributes.healths.findAll { health ->
health.instanceName == instance.name
}.collect {
objectMapper.convertValue(it, GoogleLoadBalancerHealth)
}
if (foundHealths) {
// TODO(ttomsu): Instances attached to a load balancer without a health check will be marked as HEALTHY,
Expand Down

0 comments on commit 8af0a2f

Please sign in to comment.