Skip to content

[Feature]: Isolation checker for the liveness probe of a primary #7551

Description

@gbartolini

Is there an existing issue already for this feature request/idea?

  • I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.

What problem is this feature going to solve? Why should it be added?

Version 1.26 introduced opt-in experimental support for this feature in PR #7466. This feature can be explicitly activated via an annotation.

Describe the solution you'd like

We need to define a clear API in the liveness probe to enable this feature and define the relevant timeouts.

Feedback coming from early adopters, preferably in this ticket, will shape the final result.

Describe alternatives you've considered

Alternatives have been discussed in:

Additional context

In the referenced tickets

Backport?

No

Are you willing to actively contribute to this feature?

Yes

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added this to the 1.27.0 milestone on May 13, 2025
  2. self-assigned this
    on May 13, 2025
  3. added
    enhancement 🪄
    on May 13, 2025
  4. moved this to Todo in Roadmapon May 13, 2025
  5. gbartolini commented on Jun 18, 2025

    @gbartolini
    ContributorAuthor

    I am trying to propose an interface for this:

    spec:
      probes:
        liveness:
          isolationCheck:
            enabled: true
            requestTimeout: "1000"
            connectionTimeout: "1000"

    By default, CloudNativePG automatically configures the liveness probe parameters based on the value of .spec.livenessProbeTimeout, specifically:

    • failureThreshold: FAILURE_THRESHOLD
    • periodSeconds: 10
    • successThreshold: 1
    • timeoutSeconds: 5

    Given that .spec.livenessProbeTimeout is by default set to 30, the liveness probe will report a failure if it detects three consecutive probe failures, with a 10-second interval between each check.

    We would first need to discuss whether this setting is appropriate when the isolation check is enabled.

    Second, I would like to discuss whether isolationCheck is enabled by default starting from 1.27.

    Please don't hesitate to propose a different interface and give feedback on the above.

    Finally, we need to remove the support for the annotation and update the docs.

  6. gbartolini commented on Jun 19, 2025

    @gbartolini
    ContributorAuthor

    I spoke with @fcanovai today, and we agreed that keeping the default value at 30 seconds for detecting when the primary is isolated is appropriate, as we want to identify this issue as quickly as possible.

    The only remaining decision is whether to set probes.liveness.isolationCheck.enabled to true by default.

    Do you have any comments on this? Shall we start with "disabled" (as the patch does) and re-evaluate it when we have more use cases and feedback?

  7. mnencia commented on Jun 20, 2025

    @mnencia
    Member

    Ultimately, I believe this feature should be enabled by default to promote best practices and improve cluster safety. However, I’m not yet confident that it has been tested broadly enough. As a next step, I suggest enabling it by default now and actively encouraging community members to test it in a variety of environments. If any significant issues or valid concerns arise, we can revisit the default setting and disable it before the final release of 1.27.0.

  8. moved this from Todo to Done in Roadmapon Jul 4, 2025
  9. added a commit that references this issue on Jul 4, 2025
    b6b00d7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement 🪄

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions