canonical / canonical/postgresql-operator

PostgreSQL cluster enters a weird state when a unit changes its IP

Open
#1,528 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
20
Forks
36
Avg merge
4d 15h
Merged PRs (30d)
30

Description

## Steps to reproduce

1. Create a 3 node cluster without TLS, so that self-signed certs are used
2. Change the IP of the interface of one of the nodes
3. Reboot the node or restart the charmed-postgresql snap (not sure about the latter)

## Expected behavior

The charm handles the IP change and the cluster is updated

## Actual behavior

1. The self-signed cert is not renewed with the new IP in the CN and SAN. Instead, the old node cert is used
2. The patroni cluster looks healthy in the topology but the node emits errors in the journal
3. The application databag in the database-peers relation contain 4 members, one entry with the old IP and another entry with the new IP

## Versions

Operating system: Ubuntu 24.04

Juju CLI: 3.16.14

Juju agent: 3.16.14

Charm revision: 1047

LXD: 5.2

## Log output

Juju debug log:

## Additional context

Matrix discussion: https://matrix.to/#/!UdMFp6PW7upvLcqtiq_KQggh80xzNywIde5lxVr2BxY/$QNinH5O_n9K-ISgABW6zCQHc4wCPraPq1Z-P0nMWxA8?via=ubuntu.com&via=matrix.org&via=laquadrature.net

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.