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/internalClusterTest/java/org/elasticsearch/action/admin/cluster/desirednodes/TransportDesiredNodesActionsIT.java
)
                )
            );
        }
        {
            
            
            final var updateDesiredNodesRequest = new UpdateDesiredNodesRequest(
                UUIDs.randomBase64UUID(),
                randomIntBetween(1, 20),
                randomList(
                    1,
                    20,
                    () -> randomDesiredNode(
                        Version.CURRENT,
                        Settings.builder().put(NODE_PROCESSORS_SETTING.getKey(), numProcessors).build(),
                        numProcessors
                    )
                ),
                false
            );
            updateDesiredNodes(updateDesiredNodesRequest);
            final DesiredNodes latestDesiredNodes = getLatestDesiredNodes();
            assertStoredDesiredNodesAreCorrect(updateDesiredNodesRequest, latestDesiredNodes);
            assertThat(latestDesiredNodes.nodes().isEmpty(), is(equalTo(false)));
            for (final var desiredNodeWithStatus : latestDesiredNodes) {
                final var desiredNode = desiredNodeWithStatus.desiredNode();
                assertThat(desiredNode.settings().get(NODE_PROCESSORS_SETTING.getKey()), is(equalTo(Integer.toString(numProcessors))));
            }
        }