During desired nodes updates the system validates that the provided node settings are valid in order to avoid boot looping issues. If one of the node settings depends on a secure setting, the validation fails even when the secure setting is present and correct.
server/src/test/java/org/elasticsearch/cluster/desirednodes/DesiredNodesSettingsValidatorTests.java
}
    public void testUnknownSettingsInKnownVersionsAreInvalid() {
        final ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, Collections.emptySet());
        final DesiredNodesSettingsValidator validator = new DesiredNodesSettingsValidator(clusterSettings);
        final List<DesiredNode> desiredNodes = randomList(2, 10, () -> randomDesiredNode(Version.CURRENT, Settings.EMPTY));
        IllegalArgumentException exception = expectThrows(IllegalArgumentException.class, () -> validator.validate(desiredNodes));
        assertThat(exception.getMessage(), containsString("Nodes with ids"));
        assertThat(exception.getMessage(), containsString("contain invalid settings"));
        assertThat(exception.getSuppressed().length > 0, is(equalTo(true)));
        assertThat(exception.getSuppressed()[0].getMessage(), containsString("unknown setting"));
    }
    public void testUnknownSettingsInFutureVersionsAreNotValidated() {
        final ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, Collections.emptySet());
        final DesiredNodesSettingsValidator validator = new DesiredNodesSettingsValidator(clusterSettings);
        final List<DesiredNode> desiredNodes = randomList(
            1,
            10,
            () -> randomDesiredNode(
                Version.fromString("99.9.0"),
                Settings.builder().put(randomAlphaOfLength(10), randomAlphaOfLength(10)).build()
            )
        );
        validator.validate(desiredNodes);
    }
    public void testNodeProcessorsValidation() {
        final Set<Setting<?>> availableSettings = Set.of(NODE_PROCESSORS_SETTING, NODE_EXTERNAL_ID_SETTING, NODE_NAME_SETTING);
        final ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, availableSettings);
        final DesiredNodesSettingsValidator validator = new DesiredNodesSettingsValidator(clusterSettings);
        {
            int desiredNodeProcessors = 128;