diff --git a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/TitusCachingProvider.groovy b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/TitusCachingProvider.groovy index e8a2284443e..55fe044a1e7 100644 --- a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/TitusCachingProvider.groovy +++ b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/TitusCachingProvider.groovy @@ -42,7 +42,7 @@ class TitusCachingProvider implements Provider, EurekaAwareProvider { @Override Boolean isProviderForEurekaRecord(Map attributes) { - attributes.containsKey('titusTaskId') && attributes.get('titusTaskId') != null + attributes.containsKey('titusTaskId') && attributes.get('titusTaskId') != null && attributes.get('instanceId') != null } @Override @@ -52,7 +52,7 @@ class TitusCachingProvider implements Provider, EurekaAwareProvider { @Override String getInstanceHealthKey(Map attributes, String region, String healthId) { - Keys.getInstanceHealthKey(attributes.titusTaskId, healthId) + Keys.getInstanceHealthKey(attributes.instanceId, healthId) } } diff --git a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusClusterProvider.groovy b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusClusterProvider.groovy index 8eca879ffea..fe5b816ed3b 100644 --- a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusClusterProvider.groovy +++ b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusClusterProvider.groovy @@ -241,7 +241,7 @@ class TitusClusterProvider implements ClusterProvider { instanceData.each { instanceEntry -> externalHealthProviders.each { externalHealthProvider -> externalHealthProvider.agents.each { externalHealthAgent -> - def key = Keys.getInstanceHealthKey(instanceEntry.attributes.task.id, externalHealthAgent.healthId) + def key = Keys.getInstanceHealthKey(instanceEntry.attributes.task.instanceId, externalHealthAgent.healthId) healthKeysToInstance.put(key, instanceEntry.id) } } diff --git a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusInstanceProvider.groovy b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusInstanceProvider.groovy index 8e46402b109..b11918ddebe 100644 --- a/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusInstanceProvider.groovy +++ b/clouddriver-titus/src/main/groovy/com/netflix/spinnaker/clouddriver/titus/caching/providers/TitusInstanceProvider.groovy @@ -70,7 +70,7 @@ class TitusInstanceProvider implements InstanceProvider { externalHealthProviders.each { externalHealthProvider -> def healthKeys = [] externalHealthProvider.agents.each { externalHealthAgent -> - healthKeys << Keys.getInstanceHealthKey(instance.name, externalHealthAgent.healthId) + healthKeys << Keys.getInstanceHealthKey(instance.instanceId, externalHealthAgent.healthId) } healthKeys.unique().each { key -> def externalHealth = cacheView.getAll(HEALTH.ns, key)