Skip to content

Commit 698dcb7

Browse files
committed
Extra logging for nulls in LB client
1 parent bc85973 commit 698dcb7

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

SingularityService/src/main/java/com/hubspot/singularity/hooks/LoadBalancerClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ public List<LoadBalancerUpstream> getUpstreamsForTasks(
9696
);
9797

9898
for (SingularityTask task : tasks) {
99+
// Temp logging to debug FAILED_INTERNAL_STATE issue
100+
if (task == null || task.getMesosTask() == null) {
101+
LOG.warn(
102+
"Unable to get ports for task {}",
103+
task,
104+
new RuntimeException("For a stack trace")
105+
);
106+
}
99107
final Optional<Long> maybeLoadBalancerPort = MesosUtils.getPortByIndex(
100108
mesosProtosUtils.toResourceList(task.getMesosTask().getResources()),
101109
task.getTaskRequest().getDeploy().getLoadBalancerPortIndex().orElse(0)

0 commit comments

Comments
 (0)