puppetlabs / puppetlabs/puppetlabs-postgresql
service_status being set without honoring custom service_name
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 232
- Forks
- 610
- Avg merge
- 5d 23h
- Merged PRs (30d)
- 4
Description
Describe the Bug
Hi,
we're using 8.2.1 right now. We have a custom service_name being set, in our case it's "postgresql-11".
That is fine so far (it seems) except for service_status.
manifests/params.pp doesn't honor a custom service_name so it's defining "postgresql" as default which is then used by service_status.
This results in having a service definition in
manifests/server/service.pp for "postgresql-11" (the custom one) but having a service status defined as e.g. "systemctl status postgresql". This then results into the service being treated as stopped / not running and Puppet trying to start postgresql-11 then (which is already running) on every Puppet run.
Expected Behavior
service_status or params.pp should honor custom settings
Steps to Reproduce
Broken e.g.:
class { 'postgresql::server':
package_name => 'postgresql11-server',
service_name => 'postgresql-11',
...
}
Working:
class { 'postgresql::server':
package_name => 'postgresql11-server',
service_name => 'postgresql-11',
service_status => 'systemctl status postgresql-11', # puppetlabs-postgresql defaultet zu "postgresql"
...
}
Environment
- CentOS 7.9.2009
- Puppet 7.21.0
- puppetlabs-postgresql 8.2.1
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 in manifests/params.pp to trace how the default service_status is derived from service_name, then compare it with the service definition in manifests/server/service.pp. Reproduce the custom postgresql-11 configuration and confirm that service_status uses the custom name without repeatedly attempting to start an already-running service.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100