/** * Executes the bootstrap checks if the node has the transport protocol bound to a non-loopback interface. If the system property * {@code es.enforce.bootstrap.checks} is set to {@code true} then the bootstrap checks will be enforced regardless of whether or not * the transport protocol is bound to a non-loopback interface. * * @param context the current node bootstrap context * @param boundTransportAddress the node network bindings */ static void check(final BootstrapContext context, final BoundTransportAddress boundTransportAddress, List<BootstrapCheck> additionalChecks) throws NodeValidationException { final List<BootstrapCheck> builtInChecks = checks(); final List<BootstrapCheck> combinedChecks = new ArrayList<>(builtInChecks); combinedChecks.addAll(additionalChecks); check( context, enforceLimits(boundTransportAddress, DiscoveryModule.DISCOVERY_TYPE_SETTING.get(context.settings())), Collections.unmodifiableList(combinedChecks)); }
throw new UncheckedIOException(e); validateNodeBeforeAcceptingRequests(new BootstrapContext(environment, onDiskMetadata), transportService.boundAddress(), pluginsService .filterPlugins(Plugin .class)
throw new UncheckedIOException(e); validateNodeBeforeAcceptingRequests(new BootstrapContext(settings, onDiskMetadata), transportService.boundAddress(), pluginsService .filterPlugins(Plugin .class)
throw new UncheckedIOException(e); validateNodeBeforeAcceptingRequests(new BootstrapContext(settings, onDiskMetadata), transportService.boundAddress(), pluginsService .filterPlugins(Plugin .class)
@Override public BootstrapCheckResult check(BootstrapContext context) { if (BootstrapSettings.SYSTEM_CALL_FILTER_SETTING.get(context.settings()) && !isSystemCallFilterInstalled()) { final String message = "system call filters failed to install; " + "check the logs and fix your configuration or disable system call filters at your own risk"; return BootstrapCheckResult.failure(message); } else { return BootstrapCheckResult.success(); } }
@Override public BootstrapCheckResult check(BootstrapContext context) { if (BootstrapSettings.MEMORY_LOCK_SETTING.get(context.settings()) && !isMemoryLocked()) { return BootstrapCheckResult.failure("memory locking requested for elasticsearch process but memory is not locked"); } else { return BootstrapCheckResult.success(); } }
@Override public BootstrapCheckResult check(final BootstrapContext context) { // we only enforce the check if mmapfs is an allowed store type if (IndexModule.NODE_STORE_ALLOW_MMAPFS.get(context.settings())) { if (getMaxMapCount() != -1 && getMaxMapCount() < LIMIT) { final String message = String.format( Locale.ROOT, "max virtual memory areas vm.max_map_count [%d] is too low, increase to at least [%d]", getMaxMapCount(), LIMIT); return BootstrapCheckResult.failure(message); } else { return BootstrapCheckResult.success(); } } else { return BootstrapCheckResult.success(); } }