canonical / canonical/postgresql-operator
enhance UX message when trying to deploy data-integrator on non-primary cluster
- Dominant language
- Python
- Stars
- 20
- Forks
- 36
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 30
Description
on cross-DC replicated context, if trying to deploy data-integrator on the non-primary cluster the error is not very explanatory.
consider an error message like 'deployment not needed on replicated standby cluster', and/or add a note in the charm documentation
non-primary cluster
```
# this was successfully installed previous to replication setup
data-integrator-testdb active 1 data-integrator latest/stable 418 no
# this fails trying to install a new db, as day2 ops (after replication setup)
data-integrator-swarmmain1 blocked 1 data-integrator latest/stable 418 no Please relate the data-integrator with the desired product
...
data-integrator-swarmmain1/0* blocked idle 1/lxd/1 10.46.16.48 Please relate the data-integrator with the desired product
...
ddev-postgresql/0* blocked idle 0 10.46.16.23 5432/tcp Failed to initialize relation database
```
```
2026-06-24 11:45:22 ERROR unit.ddev-postgresql/0.juju-log server.go:405 database-peers:3: single_kernel_postgresql.compat.postgresql:Failed to create database: cannot execute CREATE DATABASE in a read-only transaction
```
similar to https://github.com/canonical/postgresql-operator/issues/1329 on different operation
Contributor guide
Research direction
Reproduce deployment of data-integrator on a non-primary cluster after replication, then trace the “Failed to initialize relation database” path shown in the Juju status and PostgreSQL log. Compare the behavior with postgresql-operator issue 1329; done when the failure gives an explanatory message or the charm documentation clearly explains that deployment is not needed on a replicated standby cluster.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100