Skip to content

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

@skatsaounis

Description

@skatsaounis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working as expected

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions