cloudfoundry-community / postgres-boshrelease

A BOSH release for deploying PostgreSQL
MIT License
8 stars 10 forks source link

fails with dns2 enabled #11

Closed drnic closed 7 years ago

drnic commented 7 years ago

I deployed postgres-boshrelease to a bosh with DNS2 enabled (local-dns.yml in bosh-deployment) and postgres job fails:

From the logs:

==> /var/vcap/sys/log/postgres/postgres.log <==
waiting for server to start....LOG:  specifying both host name and CIDR mask is invalid: "cd37d400-c3b0-48f6-84bb-e19c97be381f.idp-api-postgres.default.identity-idp.bosh/32"
CONTEXT:  line 11 of configuration file "/var/vcap/jobs/postgres/config/hba.conf"
FATAL:  could not load pg_hba.conf
 stopped waiting
pg_ctl: could not start server
Examine the log output.

From cat /var/vcap/jobs/postgres/config/hba.conf

# replication hosts
host replication replication cd37d400-c3b0-48f6-84bb-e19c97be381f.idp-api-postgres.default.identity-idp.bosh/32 trust

This comes from this template snippet:

<% link("db").instances.each do |instance|
%>host replication replication <%= instance.address %>/32 trust
<% end %>
drnic commented 7 years ago

@cppforlife do you have suggestions how we'd resolve this - supporting both non-dns (instance.address returns IP) and dns2?

cppforlife commented 7 years ago

it might be worthwhile to provide some kind of address_ipv4? accessor. though once system transitions to dns by default this might be less of a concern. currently you may have to do some ipv4 digit regex?

Sent from my iPhone

On May 3, 2017, at 10:37 PM, Dr Nic Williams notifications@github.com wrote:

@cppforlife do you have suggestions how we'd resolve this - supporting both non-dns (instance.address returns IP) and dns2?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

drnic commented 7 years ago

@cppforlife ok thx