Closed dparv closed 5 months ago
Hi, @dparv, there's a limit on the relations to data integrator to 1 and postgresql
is already related to it. You'll need to either use a different data-integrator
for pgbouncer
or remove the relation between data-integrator
and postgresql
to be able to relate with pgbouncer
.
That being said, the 1/stable
branch won't be very useful, since you won't be able to access pgb outside of the data-integrator's container. The changes to provide external service are still on 1/edge
.
@dragomirp I tried with 1/edge also, removed the application, re-deployed with different name, related only to data-integrator and no success - the same error:
juju deploy pgbouncer pgbouncer1 --channel 1/edge --series jammy
WARNING series flag is deprecated, use --base instead
Deployed "pgbouncer1" from charm-hub charm "pgbouncer", revision 155 in channel 1/edge on ubuntu@22.04/stable
juju integrate pgbouncer1 data-integrator
ERROR cannot add relation "data-integrator:postgresql pgbouncer1:database": establishing a new relation for data-integrator:postgresql would exceed its maximum relation limit of 1 (quota limit exceeded)
And the tutorial states I have to relate to both postgresql and to data-integrator - otherwise how would I get the database connection pool?
@dparv, you need to relate pgbouncer to postgresql and data-integrator to pgbouncer, not postgresql to data-integrator. If postgresql is already related to data-integrator, the limit is exceeded and juju will reject the relation.
This is how to deploy on a clean model:
> juju deploy pgbouncer --channel 1/edge
Deployed "pgbouncer" from charm-hub charm "pgbouncer", revision 155 in channel 1/edge on ubuntu@22.04/stable
> juju deploy data-integrator
Deployed "data-integrator" from charm-hub charm "data-integrator", revision 19 in channel latest/stable on ubuntu@22.04/stable
> juju deploy postgresql --config profile=testing
Deployed "postgresql" from charm-hub charm "postgresql", revision 363 in channel 14/stable on ubuntu@22.04/stable
> juju integrate postgresql pgbouncer
> juju integrate pgbouncer data-integrator
> juju config data-integrator database-name=testdb
On the existing model, you should be able to do juju remove-relation postgresql data-integrator
and then you should be able to relate pgbouncer with data-integrator.
Okay, that made it work, thanks!
Steps to reproduce
Following on the tutorial here: https://discourse.charmhub.io/t/pgbouncer-tutorial-deploy-pgbouncer/12290/1 I can't relate the data-integrator with the pgboucher charm:
Expected behavior
Be able to integrate the charms
Actual behavior
Integration fails
Versions
Operating system: jammy Juju CLI: 3.4.2-genericlinux-amd64 Juju agent: 3.4.0 postgresql charm revision: 14/stable 363 pgbouncer charm revision: 1/stable 88
LXD: N/A, runs on openstack
Log output
Juju debug log: N/A; client error