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

[bitnami/postgresql-ha] Postgresql-ha Deployment Failure When Adding Custom Host to pgHbaConfiguration in Values File #26436

Closed
AnkitDwivedi74 opened this issue May 25, 2024 · 1 comment
Assignees
Labels
postgresql-ha solved tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@AnkitDwivedi74
Copy link

AnkitDwivedi74 commented May 25, 2024

Name and Version

bitnami/postgresql-ha
chart version 14.0.12

What architecture are you using?

amd64

What steps will reproduce the bug?

i tried to add my custom pgHbaConfiguration in values file but my deployment goes failed.

Are you using any custom parameters or values?

I am deploying PostgreSQL-HA using the Bitnami repository and I want to add custom hosts to the pg_hba.conf via the pgHbaConfiguration in my values.yaml file. However, when I add the hosts in the values.yaml file and deploy, the deployment fails.

pgHbaConfiguration: |-
    host     all            repmgr    0.0.0.0/0    md5
    host     repmgr         repmgr    0.0.0.0/0    md5
    host     repmgr         repmgr    ::/0    md5
    host     replication      repmgr    0.0.0.0/0    md5
    host     replication      repmgr    ::/0    md5
    #hostssl     all             all             0.0.0.0/0               cert
    #hostssl     all             all             ::/0                    cert
    host     all              all       0.0.0.0/0    md5
    host     all              all       ::/0         md5
    local    all              all                    md5
    host     all            all       psql.example.com    md5
   server started
2024-05-25 11:22:35.226 GMT [97] FATAL: no pg_hba.conf entry for host "[local]", user "postgres", database "postgres", no encryption
postgresql-repmgr 11:22:35.23 INFO ==> ** Starting repmgrd **
[2024-05-25 11:22:35] [NOTICE] repmgrd (repmgrd 5.4.1) starting up
2024-05-25 11:22:35.313 GMT [100] FATAL: role "repmgr" does not exist
[2024-05-25 11:22:35] [ERROR] connection to database failed
[2024-05-25 11:22:35] [DETAIL]
connection to server at "db-test-postgresql-ha-postgresql-0.db-test-postgresql-ha-postgresql-headless.postgres-ha.svc.cluster.local" (10.131.1.64), port 5432 failed: FATAL: role "repmgr" does not exist
[2024-05-25 11:22:35] [DETAIL] attempted to connect using:
user=repmgr password=j26dK0cXGb connect_timeout=5 dbname=repmgr host=db-test-postgresql-ha-postgresql-0.db-test-postgresql-ha-postgresql-headless.postgres-ha.svc.cluster.local port=5432 fallback_application_name=repmgr options=-csearch_path

This issue started occurring after adding the custom host configuration. The deployment works correctly without this modification. Any insights or fixes would be greatly appreciated.

What is the expected behavior?

The deployment should succeed, and the custom hosts should be added to the pg_hba.conf configuration.
No response

What do you see instead?

The deployment fails, and the PostgreSQL pods do not start successfully.

Additional information

error

server started
2024-05-25 11:22:35.226 GMT [97] FATAL: no pg_hba.conf entry for host "[local]", user "postgres", database "postgres", no encryption
postgresql-repmgr 11:22:35.23 INFO ==> ** Starting repmgrd **
[2024-05-25 11:22:35] [NOTICE] repmgrd (repmgrd 5.4.1) starting up
2024-05-25 11:22:35.313 GMT [100] FATAL: role "repmgr" does not exist
[2024-05-25 11:22:35] [ERROR] connection to database failed
[2024-05-25 11:22:35] [DETAIL]
connection to server at "db-test-postgresql-ha-postgresql-0.db-test-postgresql-ha-postgresql-headless.postgres-ha.svc.cluster.local" (10.131.1.64), port 5432 failed: FATAL: role "repmgr" does not exist
[2024-05-25 11:22:35] [DETAIL] attempted to connect using:
user=repmgr password=j26dK0cXGb connect_timeout=5 dbname=repmgr host=db-test-postgresql-ha-postgresql-0.db-test-postgresql-ha-postgresql-headless.postgres-ha.svc.cluster.local port=5432 fallback_application_name=repmgr options=-csearch_path
@AnkitDwivedi74 AnkitDwivedi74 added the tech-issues The user has a technical issue about an application label May 25, 2024
@github-actions github-actions bot added the triage Triage is needed label May 25, 2024
@AnkitDwivedi74 AnkitDwivedi74 changed the title Deployment Failure When Adding Custom Host to pgHbaConfiguration in Values File Postgresql-ha Deployment Failure When Adding Custom Host to pgHbaConfiguration in Values File May 25, 2024
@javsalgar javsalgar changed the title Postgresql-ha Deployment Failure When Adding Custom Host to pgHbaConfiguration in Values File [bitnami/postgresql-ha] Postgresql-ha Deployment Failure When Adding Custom Host to pgHbaConfiguration in Values File May 27, 2024
@javsalgar
Copy link
Contributor

Hi!

Could you compare the differences between the pg_hba.conf generated by default and the one you are providing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
postgresql-ha solved tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants