saltstack / saltstack/salt

stopped PostgreSQL server leads to no errors

Open
#54,471 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Similar to #54470 and #54469

This time:

postgres@my-host:~> psql abc
psql: konnte nicht mit dem Server verbinden: Datei oder Verzeichnis nicht gefunden
	Läuft der Server lokal und akzeptiert er Verbindungen
	auf dem Unix-Domain-Socket »/var/run/postgresql/.s.PGSQL.5432«?

Output of salt is SUCCESS

          ID: abc__database_absent
    Function: postgres_database.absent
        Name: abc
      Result: True
     Comment: Database abc is not present, so it cannot be removed
     Started: 11:48:10.359703
    Duration: 5143.332 ms
     Changes:   

This should definitely lead to an error and a comment that the server is down.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by running postgres_database.absent for database abc while the local PostgreSQL server is stopped. Inspect the postgres_database.absent entry point and compare its handling of the connection failure with the reported SUCCESS result. Done means the operation reports an error and explains that the server is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.