puppetlabs / puppetlabs/puppetlabs-postgresql
Managing postgresql::server::role fails when using non-default port
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 232
- Forks
- 610
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 4
Description
Describe the Bug
Before #1498, only one configuration key was needed to manage both postgresql::server and postgresql::server::role: postgresql::server::port.
Since the PR, if only the first key is set, Puppet will fail to create the role claiming it can't connect to port 5432.
We are now forced to set 2 configuration keys when we want to start postgresql server on a custom TCP port:
---
postgresql::server::port: 5433
postgresql::globals::default_connect_settings:
"PGPORT": "5433"
Expected Behavior
One key to manage tcp port for both server and managed resources (role, extension, ...).
Steps to Reproduce
Steps to reproduce the behavior:
- Set
postgresql::serverwith a custom port (eg 5433) - Set
postgresql::server::role - Do a puppet run and see postgresql::server::role failing
Environment
- puppetlabs-postgresql 10.0.2
- Platform - RHEL9/Postgresql 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Puppet run with postgresql::server::port set to 5433 and postgresql::server::role managed without PGPORT. Trace how the server port and default_connect_settings reach the role connection. Done means the role and other managed resources use the configured custom port without requiring a second setting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, ruby
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100