puppetlabs-postgresql icon indicating copy to clipboard operation
puppetlabs-postgresql copied to clipboard

postgresql::server::grant does not honor connect_settings

Open kgeis opened this issue 3 years ago • 5 comments

Describe the Bug

I am using the postgresql::server::grant type to manage an external PostgreSQL server that is not managed with postgresql::server. When I use grant_role, I use the connect_settings parameter, and it works. When I do the same with grant, I get the following:

Mar  9 13:58:49 phoebe2 puppet-agent[1748481]: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Postgresql::Server::Grant[SELECT ON SCHEMA brs TO brs]:
Mar  9 13:58:49 phoebe2 puppet-agent[1748481]:   parameter 'psql_db' expects a String value, got Undef
Mar  9 13:58:49 phoebe2 puppet-agent[1748481]:   parameter 'psql_user' expects a String value, got Undef
Mar  9 13:58:49 phoebe2 puppet-agent[1748481]:   parameter 'port' expects an Integer value, got Undef
Mar  9 13:58:49 phoebe2 puppet-agent[1748481]:   parameter 'group' expects a String value, got Undef
Mar  9 13:58:49 phoebe2 puppet-agent[1748481]:   parameter 'psql_path' expects a String value, got Undef (file: /etc/puppetlabs/code/environments/production/manifests/site.pp, line: 215) on node phoebe2.rac.berkeley.edu

Expected Behavior

I expect that by setting connect_settings, I won't need to set psql_db, psql_user, port, group, and psql_path separately.

Steps to Reproduce

  1. Set up a connect_settings hash.
  2. Create a task that uses the connect_settings without the other parameters.

Environment

  • Version 8.0.0
  • Platform Ubuntu 20.04.4, Postgresql 13.2

kgeis avatar Mar 09 '22 22:03 kgeis

This issue has been marked as stale because it has been open for a while and has had no recent activity. If this issue is still important to you please drop a comment below and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar May 10 '22 02:05 github-actions[bot]

still important

kgeis avatar May 10 '22 19:05 kgeis

Hello! 👋

This issue has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which issues need our attention.

If you are waiting on a response from us we will try and address your comments on a future Community Day.

Alternatively, if it is no longer relevant to you please close the issue with a comment.

github-actions[bot] avatar Aug 09 '22 02:08 github-actions[bot]

That was rude, @github-actions!

@chelnak: Can we keep this open, please?

kgeis avatar Aug 17 '22 16:08 kgeis

@kgeis I've re-opened this for you... The bot must be having a bad day as it's not meant to close issues anymore. 🤖

chelnak avatar Aug 17 '22 16:08 chelnak