Postgres server fails because of hostname + CIDR

Bug #1117542 reported by Marco Ceppi
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
postgresql (Juju Charms Collection)
Fix Released
Undecided
Marco Ceppi

Bug Description

When troubleshooting issues with the charm, the following occurs

2013-02-06 17:45:40 UTC LOG: specifying both host name and CIDR mask is invalid: "ip-10-4-81-12.ec2.internal/32"
2013-02-06 17:45:40 UTC CONTEXT: line 9 of configuration file "/etc/postgresql/9.1/main/pg_hba.conf"
2013-02-06 17:45:40 UTC FATAL: could not load pg_hba.conf

The pg_hba.conf looks like this:

#------------------------------------------------------------------------------
# This file is managed by Juju
#------------------------------------------------------------------------------

# Database administrative login by UNIX sockets
local all postgres ident map=superusers

host discourse db_2_discourse_0_schema ip-10-4-81-12.ec2.internal/32 md5

Related branches

Marco Ceppi (marcoceppi)
Changed in postgresql (Juju Charms Collection):
assignee: nobody → Marco Ceppi (marcoceppi)
Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Not all environments provide an IP address or a hostname[1]. `private-address` can be either. The hook needs to verify if it's an IP address and append the /32 when passing the ip address to the template.

[1]: http://meta.discourse.org/t/deploying-discourse-to-amazon-and-other-clouds/1632/14

Changed in postgresql (Juju Charms Collection):
status: New → In Progress
Marco Ceppi (marcoceppi)
Changed in postgresql (Juju Charms Collection):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.