Skip to content

fix: sort redfish_exporter_targets to avoid config changes#2184

Merged
priteau merged 1 commit intostackhpc/2024.1from
redfish-sort-2024.1
Feb 27, 2026
Merged

fix: sort redfish_exporter_targets to avoid config changes#2184
priteau merged 1 commit intostackhpc/2024.1from
redfish-sort-2024.1

Conversation

@jackhodgkiss
Copy link
Contributor

When templating redfish_exporter_targets in 60-redfish.yml the groups are written randomly and as a result can cause unnecessary updates to the templated file which can lead to reboots of prometheus as well as polluting configuration diff.

When templating `redfish_exporter_targets` in `60-redfish.yml` the
groups are written randomly and as a result can cause unnecessary
updates to the templated file which can lead to reboots of prometheus
as well as polluting configuration diff.

Signed-off-by: Jack Hodgkiss <jack@stackhpc.com>
@jackhodgkiss jackhodgkiss requested a review from a team as a code owner February 27, 2026 12:07
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly fixes an idempotency issue in the 60-redfish.yml Prometheus configuration by sorting the redfish_exporter_targets group. This ensures a consistent order for the generated scrape targets, preventing unnecessary configuration updates and potential service restarts. The implementation is correct and follows best practices for idempotent configurations. It would be beneficial to audit other configuration templates for similar unsorted loops over Ansible groups to further enhance system stability.

@priteau priteau merged commit 19ba44b into stackhpc/2024.1 Feb 27, 2026
23 checks passed
@priteau priteau deleted the redfish-sort-2024.1 branch February 27, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants