Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify password authentication for initdb and adjust pwfile permissions #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

acritelli
Copy link

The current configure-psql.sh script will report success (and the appropriate capabilities appear in the deployment), but attempts to log in to Postgres via the psql command on the host fail. This is because current versions of Postgres use peer authentication by default in their pg_hba.conf file.

The fix proposed in this PR adds the -A password switch to initdb, which allows password authentication to work.

Adding this switch revealed that the permissions on the temporary password file were preventing initdb from reading it. By default, mktemp creates the temporary file with 0600 permissions. Since this is run as the centos user, the postgres user was unable to read the password file.

I confirmed this fix works by uploading the updated blueprints to my Cloudify manager (v6.2) and creating a dev-small environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant