Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Imporve] The current use of K8s ConfigMap as lease judgement in Lorry may lead to availability defects. #7283

Closed
lingdie opened this issue May 9, 2024 · 1 comment
Assignees
Milestone

Comments

@lingdie
Copy link
Contributor

lingdie commented May 9, 2024

Consider the following scenarios:

  1. In a single-master Kubernetes cluster: After the apiserver master node exits, Lorry's lease judgment becomes entirely unavailable.

  2. In a three-master Kubernetes cluster: After the apiserver master node exits, testing reveals that Lorry's lease judgment might result in errors, causing the high-availability PostgreSQL cluster to re-elect a new primary.

code ref:

func (store *KubernetesStore) CreateLease() error {

@xuriwuyun
Copy link
Contributor

The PG switchover issue arises from Patroni when the API server is down, and Lorry do not demote the primary in case of a failed API server access. To address this problem, there are two possible approaches:

  1. Implement high availability for the API server and perform upgrades one by one.
  2. If the PG cluster has only one replica, disable the Patroni high availability functionality.

@github-actions github-actions bot added this to the Release 0.8.3 milestone May 23, 2024
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

No branches or pull requests

2 participants