Closed claudiubelu closed 6 months ago
Hi, @claudiubelu, I was able to replicate locally on revision 351, but not on the latest 14/stable
(rev. 363). There were issues with juju secrets on 351 that I believe are the root cause for this. Can you retry with rev. 363?
Dear @claudiubelu the revision 363 is now in 14/stable
.
I am resolving this issue due to lack of your reply on the message above.
Feel free to reopen the issue if you are still experiencing this issue. Thank you for the bugreport!
Steps to reproduce
Currently, we're using the postgresql charm (number of units: 3, channel: 14/stable, rev: 351) in relation with the landscape-server charm. Everything works fine, the postgresql unit Primary changes. From then on, the related application crashes, as it is now connected to a read-only PostgreSQL database. Note the error
storm.database.ReadOnlySqlTransaction: cannot execute UPDATE in a read-only transaction
below:Or in one of its other services:
After some investigation, we've seen the following landscape-server relation data:
As it can be seen from the relation data, the master is: "master: dbname=landscape-server host=10.252.20.58". Though, it is not. If we check the model, we see this:
Checking the landscape-server units, we can see that they were configured to use a Secondary PostgreSQL server:
This causes the Landscape server to crash, and result in "System errors" when accessing its dashboard, and clients failing to register to it.
Expected behavior
In case a new Primary is elected, the postgresql charm should update its relations with the "master", so the requirer charms can update themselves accordingly.
Actual behavior
Relation data remains the same, as seen above.
Versions
Operating system: Ubuntu 22.04.4 LTS
Juju CLI: 3.3.1-genericlinux-amd64
Juju agent: 3.3.1
Charm revision: channel 14/stable, revision 351
LXD: 5.0.3
Log output
Juju debug log:
Additional context