-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Closed
Labels
backendOAP backend related.OAP backend related.bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!so11ySelf ObservabilitySelf Observability
Milestone
Description
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- Question or discussion
Question
- What do you want to know?
If OapNode‘s role is receiver, the OAPNodeChecker'method isHealth() will return unHealth.
public static ClusterHealthStatus isHealth(List<RemoteInstance> remoteInstances) {
if (CollectionUtils.isEmpty(remoteInstances)) {
return ClusterHealthStatus.unHealth("can't get the instance list");
}
List<RemoteInstance> selfInstances = remoteInstances.stream().
filter(remoteInstance -> remoteInstance.getAddress().isSelf()).collect(Collectors.toList());
if (CollectionUtils.isEmpty(selfInstances)) {
return ClusterHealthStatus.unHealth("can't get itself");
}
if (remoteInstances.size() > 1 && hasIllegalNodeAddress(remoteInstances)) {
return ClusterHealthStatus.unHealth("find illegal node in cluster mode such as 127.0.0.1, localhost");
}
return ClusterHealthStatus.HEALTH;
}
I think OAPNodeChecker should check its role and then decide whether to get itself.
But how can I get role?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendOAP backend related.OAP backend related.bugSomething isn't working and you are sure it's a bug!Something isn't working and you are sure it's a bug!so11ySelf ObservabilitySelf Observability