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
Settings nodeSettings = Settings.builder()
                .put(NODE_EXTERNAL_ID_SETTING.getKey(), randomAlphaOfLength(10))
                .put(NODE_PROCESSORS_SETTING.getKey(), desiredNodeProcessors)
                .build();
            final List<DesiredNode> desiredNodes = List.of(
                new DesiredNode(nodeSettings, desiredNodeProcessors, ByteSizeValue.ofGb(1), ByteSizeValue.ofGb(1), Version.CURRENT)
            );
            validator.validate(desiredNodes);
        }
        {
            int desiredNodeProcessors = 128;
            Settings nodeSettings = Settings.builder()
                .put(NODE_EXTERNAL_ID_SETTING.getKey(), randomAlphaOfLength(10))
                .put(NODE_PROCESSORS_SETTING.getKey(), desiredNodeProcessors + 1.1)
                .build();
            final List<DesiredNode> desiredNodes = List.of(
                new DesiredNode(nodeSettings, desiredNodeProcessors, ByteSizeValue.ofGb(1), ByteSizeValue.ofGb(1), Version.CURRENT)
            );
            final 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("Failed to parse value [129.1] for setting [node.processors] must be <= 128.0")
            );
        }
    }
}