Impossible to start postresql

Bug #1675328 reported by Jack Ivanov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
New
Undecided
Unassigned

Bug Description

Hello,

Postgres version - 9.4

# dpkg -l | grep -i trove
ii python-trove 1:6.0.0-0ubuntu1~cloud0 all Database as a Service for OpenStack - Python lib
ii trove-common 1:6.0.0-0ubuntu1~cloud0 all Database as a Service for OpenStack - common files
ii trove-guestagent 1:6.0.0-0ubuntu1~cloud0 all Database as a Service for OpenStack - guest agent

Trove rewrites access rules and a postgres cluster is not able to start due to access restrictions:

# /usr/bin/pg_ctlcluster 9.4 --skip-systemctl-redirect main start
Warning: connection to the database failed, disabling startup checks:
psql: FATAL: role "postgres" is not permitted to log in

$ psql
psql: FATAL: role "postgres" is not permitted to log in

# cat /etc/postgresql/9.4/main/pg_hba.conf
local all postgres,os_admin trust
local all all md5
local replication postgres,os_admin trust
host all postgres,os_admin 127.0.0.1/32 trust
host all postgres,os_admin ::1/128 trust
host all postgres,os_admin localhost trust
host all os_admin 0.0.0.0/0 reject
host all os_admin ::/0 reject
host all all 0.0.0.0/0 md5
host all all ::/0 md5

Revision history for this message
Amrith Kumar (amrith) wrote :

Clearly there has to be some reason why this isn't working for you given that postgres does in fact work (in the gate, for example). Absent any steps to repro this problem, or a description of why it is happening, I'm marking this incomplete for now.

Changed in trove:
status: New → Incomplete
Revision history for this message
Jack Ivanov (gunph1ld) wrote :

It's not working because there is a function to delete the postgres superuser - https://github.com/openstack/trove/blob/stable/newton/trove/guestagent/datastore/experimental/postgresql/manager.py#L126-L134

I don't know why you decided to delete the postgres superuser, but PostgreSQL 9.3-9.5 requires this user in order to start a PostgreSQL cluster. (In the pg_ctlcluster script in Ubuntu Trusty and Xenial)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack DBaaS (Trove) because there has been no activity for 60 days.]

Changed in trove:
status: Incomplete → Expired
Revision history for this message
Andy Botting (andybotting) wrote :

We've just encountered this too. I'm building my own image and am using PostgreSQL 9.6 on Ubuntu Xenial.

I'm wondering why the postgres user is being disabled. Is it a security thing?

Changed in trove:
status: Expired → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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