cloudfoundry / postgres-release

BOSH release for PostgreSQL
Apache License 2.0
14 stars 36 forks source link

what role to use in service-broker to connect with postgres service ? #40

Closed ghost closed 6 years ago

ghost commented 6 years ago

Hello Team,

I've deployed postgres bosh release on AliCloud using bosh V2 Manifest.

I'm using https://github.com/cloudfoundry/postgres-release/blob/develop/templates/operations/set_properties.yml file to define role and I've provided password for 'pgadmin' role at deployment time from bosh CLI.

_"bosh -d DEPLOYMENT_NAME deploy -v pgadmin_database_password=foobarbaz OUTPUT_MANIFESTPATH"

Now I've configured the service-broker to use 'pgadmin' role, however I'm getting error while creating a service-instance of postgres saying: FAILED Server error, status code: 502, error code: 10001, message: Service broker error: PostgreSQL server is not reachable

I tried to connect to postgres server with psql client from jumpbox and I'm able to do so/connect with 'pgadmin' role.

_"psql -h <hostip> -p 5524 postgres pgadmin"

Please see the screenshot. image

Any suggestions please, what I'm missing ?

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/155620288

The labels on this github issue will be updated when the story is started.

suhlig commented 6 years ago

This looks like a connectivity issue between the service broker and the database. Maybe your jumpbox is allowed, but the service broker is not allowed to connect?

ghost commented 6 years ago

Yes, Broker was not able to communicate with postgres-service. Rechecked 'cf security-groups'.

Now broker is using 'vcap' role. Is this fine ?

valeriap commented 6 years ago

@lordcf vcap is the user that owns the PostgreSQL server process. I would personally use it only for dba activities and I would define a specific role with the needed permission for the client. Said that, it's your choice as dba of this instance of database.

valeriap commented 6 years ago

Closing for inactivity. Please reopen if you will have issues.