The master-is-stable indicator will retrieve useful information
regarding the discovery. This will be useful even if the local
cluster state is not recovered.

We currently do not evaluate the instance-has-master indicator
if the cluster state is not recovered, but we should remove this
constraint once master-is-stable is merged
server/src/main/java/org/elasticsearch/node/Node.java
IOUtils.closeWhileHandlingException(resourcesToClose);
            }
        }
    }
    private HealthService createHealthService(
        ClusterService clusterService,
        ClusterModule clusterModule,
        MasterHistoryService masterHistoryService
    ) {
        List<HealthIndicatorService> preflightHealthIndicatorServices = Collections.singletonList(
            new StableMasterHealthIndicatorService(clusterService, masterHistoryService)
        );
        var serverHealthIndicatorServices = List.of(
            new RepositoryIntegrityHealthIndicatorService(clusterService),
            new ShardsAvailabilityHealthIndicatorService(clusterService, clusterModule.getAllocationService())
        );
        var pluginHealthIndicatorServices = pluginsService.filterPlugins(HealthPlugin.class)
            .stream()
            .flatMap(plugin -> plugin.getHealthIndicatorServices().stream())
            .toList();
        return new HealthService(
            preflightHealthIndicatorServices,
            concatLists(serverHealthIndicatorServices, pluginHealthIndicatorServices),
            clusterService
        );
    }
    private RecoveryPlannerService getRecoveryPlannerService(
        ThreadPool threadPool,
        ClusterService clusterService,
        RepositoriesService repositoryService