When "repmgr standby switchover" is used and action commands are wrong, no details are printed
Opened this issue · 0 comments
dko-slapdash commented
Two things here:
1/ When run with e.g. Ubuntu defaults (see #715), due to service_restart_command being not set up by default, it fails on the remote end. But what I want to say is not this: the point of this issue is that, although the command fails, repmgr standby switchover
doesn't print the details about it by default at all:
$ repmgr standby switchover
NOTICE: executing switchover on node "pg-a2" (ID: 2)
NOTICE: local node "pg-a2" (ID: 2) will be promoted to primary; current primary "pg-a1" (ID: 1) will be demoted to standby
NOTICE: stopping current primary node "pg-a1" (ID: 1)
NOTICE: issuing CHECKPOINT on node "pg-a1" (ID: 1)
DETAIL: executing server command "pg_ctl -D '/var/lib/postgresql/13/main' -W -m fast stop"
INFO: checking for primary shutdown; 1 of 60 attempts ("shutdown_check_timeout")
INFO: checking for primary shutdown; 2 of 60 attempts ("shutdown_check_timeout")
2/ Even when run as repmgr standby switchover --log-level=DEBUG --verbose
, it still doesn't print anything interesting (just "no output returned"):
$ repmgr standby switchover --log-level=DEBUG --verbose
...
DETAIL: executing server command "pg_ctl -D '/var/lib/postgresql/13/main' -W -m fast stop"
DEBUG: remote_command(): no output returned
INFO: checking for primary shutdown; 1 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
INFO: checking for primary shutdown; 2 of 60 attempts ("shutdown_check_timeout")
DEBUG: ping status is: PQPING_OK
DEBUG: sleeping 1 second until next check
No exit code, no stderr - nothing. So basically, there are no debug hints on what's happening.
I think that the more intuitive the default behavior is, the easier it is to use the tool.