hapostgres / hapostgres/pg_auto_failover

Restart logic counts intended restarts as bad exit

Open
#327 4 comments 0 reactions 1 assignee Claimed by @DimCitus View on GitHub
bug Size:M
Dominant language
C
Stars
1.4k
Forks
142
Avg merge
5h 8m
Merged PRs (30d)
1

Description

Starting a monitor and running the following command 5 times in a row, causes the monitor to exit:
```
PG_AUTOCTL_DEBUG=true pg_autoctl do service restart listener --pgdata monitor
```
It exits with this log:
```
12:21:53 24163 FATAL pg_autoctl service listener has already been restarted 5 times in the last 10 seconds, stopping now
12:21:53 24167 INFO Postgres controller service received signal SIGTERM, terminating
12:21:53 24167 INFO Stopping pg_autoctl postgres service
12:21:53 24167 INFO /home/jelte/.pgenv/pgsql/bin/pg_ctl --pgdata /home/jelte/work/pg_auto_failover/monitor --wait stop --mode fast
12:21:54 24163 FATAL Something went wrong in sub-process supervision, stopping now. See above for details.
12:21:54 24163 INFO Stop pg_autoctl
```

I think we count intended restarts as bad restarts for some reason.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.