Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Sep 23, 2025

What does this PR do?

This PR adds the check of the component's unit's state on liveness endpoint. If a component state is healthy, but a unit state is degraded or failed, the liveness endpoint will return a 500.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

Liveness probes will now fail if a component state is healthy but any of the units is failed or degraded, likely causing the container to be restarted (see https://kubernetes.io/docs/concepts/configuration/liveness-readiness-startup-probes/#liveness-probe).

Related issues


This is an automatic backport of pull request #10060 done by [Mergify](https://mergify.com).
@mergify mergify bot added the backport label Sep 23, 2025
@mergify mergify bot requested a review from a team as a code owner September 23, 2025 06:08
@mergify mergify bot requested review from straistaru and ycombinator and removed request for a team September 23, 2025 06:08
@github-actions github-actions bot added bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Sep 23, 2025
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

* fix: take into account units state on liveness * extract check components state to helper * merge conditional assignment into variable declaration (cherry picked from commit 4b818a1)
Copy link
Member

@rubenruizdegauna rubenruizdegauna left a comment

Choose a reason for hiding this comment

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

LGTM

@rubenruizdegauna rubenruizdegauna enabled auto-merge (squash) September 23, 2025 09:03
@rubenruizdegauna rubenruizdegauna merged commit cc9e1c2 into 9.0 Sep 23, 2025
23 checks passed
@rubenruizdegauna rubenruizdegauna deleted the mergify/bp/9.0/pr-10060 branch September 23, 2025 10:49
@elasticmachine
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @rubenruizdegauna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport bug Something isn't working Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

2 participants