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

[BACKPORT][v1.0.2] - Fix postgres-exporter service errror: Error opening connection to database #2831

Closed
11 of 13 tasks
cicharka opened this issue Jan 4, 2022 · 1 comment
Closed
11 of 13 tasks
Assignees
Labels
type/backport Backporting to previous versions

Comments

@cicharka
Copy link
Contributor

cicharka commented Jan 4, 2022

Is your feature request related to a problem? Please describe.
When creating cluster with postgres-exporter role enabled, the result is that the postgres-exporter service is not exporting metrics at all due to the Error opening connection to database:

Jan 04 09:26:57 cicharka-postgres-test-centos-postgresql-vm-0 postgres_exporter[23084]: time="2022-01-04T09:26:57Z" level=error msg="Error opening connection to database (postgresql://:PASSWORD_REMOVED@): malformed dsn \"\"" source="postgres_exporter.go:1474"

Describe the solution you'd like
Solution is to remove additional quotation marks from the systemd unit template for Environment field:

Environment="{{ specification.systemd_environment|default("DATA_SOURCE_NAME=postgresql://postgres@:5432/postgres?host=/var/run/postgresql/&sslmode=disable") }}"

Environment
Found in epicli v1.0.1, only on machines that run CentOS


DoD checklist

  • Changelog updated
  • COMPONENTS.md updated / doesn't need to be updated
  • Schema updated / doesn't need to be updated
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
  • Idempotency tested
  • Documentation added / updated / doesn't need to be updated
  • All conversations in PR resolved
  • Solution meets requirements and is done according to design doc
  • Usage compliant with license
  • Backport tasks created / doesn't need to be backported
@cicharka cicharka added status/grooming-needed type/backport Backporting to previous versions and removed status/grooming-needed labels Jan 4, 2022
@seriva seriva self-assigned this Jan 4, 2022
seriva added a commit that referenced this issue Jan 21, 2022
… (#2826)

* Backport #2784 for issue #2774
* Backport #2813 for issue #2768
* Backport #2823 for issue #2788
* Backport #2776 for issue #1221
* Backport #2442 for issue #2426
* Backport #2764 for issue #2744
* Backport issue #2831
* Backport #2912 for issue #2894
@przemyslavic
Copy link
Collaborator

✔️ The service template has been fixed.

@seriva seriva closed this as completed Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/backport Backporting to previous versions
Projects
None yet
Development

No branches or pull requests

3 participants