mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
add a warn and don't apply ec2 unicast discovery if not found (will not really happen)
This commit is contained in:
parent
789e1a343f
commit
976d14705a
@ -49,10 +49,14 @@ public class Ec2Discovery extends ZenDiscovery {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// update the unicast zen ping to add cloud hosts provider
|
||||
// and, while we are at it, use only it and not the multicast for example
|
||||
unicastZenPing.addHostsProvider(new AwsEc2UnicastHostsProvider(settings, ec2Service.client()));
|
||||
pingService.zenPings(ImmutableList.of(unicastZenPing));
|
||||
if (unicastZenPing != null) {
|
||||
// update the unicast zen ping to add cloud hosts provider
|
||||
// and, while we are at it, use only it and not the multicast for example
|
||||
unicastZenPing.addHostsProvider(new AwsEc2UnicastHostsProvider(settings, ec2Service.client()));
|
||||
pingService.zenPings(ImmutableList.of(unicastZenPing));
|
||||
} else {
|
||||
logger.warn("failed to apply ec2 unicast discovery, no unicast ping found");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user