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

[Backup/Restore] Postgresql wrongly references Endpoint instead of Service in k8s #306

Open
phvalguima opened this issue Oct 26, 2023 · 3 comments

Comments

@phvalguima
Copy link

Looking into restore code for kubernetes, I can see in these lines that we must delete patroni-<charm-name>-config endpoint to restore from backup.

However, Patroni coming from latest 14.9, channel=14/edge, does not exist as an endpoint. It exists as a Service.
That section should fail during restore process.

@github-actions
Copy link
Contributor

@taurus-forever
Copy link
Contributor

@marceloneppel I am not sure how backup tests pass (CI and manual) if @phvalguima is right.
Should we fix something here?

@taurus-forever
Copy link
Contributor

taurus-forever commented Aug 14, 2024

@phvalguima I have quickly deployed the latest PostgreSQL:

ubuntu@juju350:~$ juju deploy postgresql-k8s --trust --channel 14/edge
Deployed "postgresql-k8s" from charm-hub charm "postgresql-k8s", revision 351 in channel 14/edge on [email protected]/stable

And I do see both Services and Endpoint patroni-<app>-config:

ubuntu@juju350:~$ kubectl get endpoints -n testisterraform | grep patroni
patroni-postgresql-k8s-config   <none>                            3m14s
patroni-postgresql-k8s-sync     <none>                            3m10s
patroni-postgresql-k8s          <none>                            3m11s

ubuntu@juju350:~$ kubectl get services -n testisterraform | grep patroni
patroni-postgresql-k8s-config   ClusterIP   None             <none>        <none>              3m22s
ubuntu@juju350:~$ 

We are most probably do not use patroni endpoint here, but safety first: on recover let's clean garbage.

The only open question to resolve this GH issue on my side: should we also remove patroni-<app>-sync endpoint here?
Otherwise feel free to resolve this issue.
CC: @marceloneppel , @dragomirp .

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