From a5aa47c1dddaa3d11a594256da995921cd10528d Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 29 Jan 2019 14:08:00 +0900 Subject: [PATCH] daemon start/stop: add warning about missing configuration repmgr will attempt to construct appropriate commands to start and stop repmgrd, but usually it's preferable for them to be explicitly defined, particularly if repmgr is installed from packages. --- doc/appendix-release-notes.sgml | 7 +++---- repmgr-action-daemon.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/appendix-release-notes.sgml b/doc/appendix-release-notes.sgml index 6d7ce39c..cf7513bb 100644 --- a/doc/appendix-release-notes.sgml +++ b/doc/appendix-release-notes.sgml @@ -21,6 +21,7 @@ &repmgr; 4.3 is a major release. + repmgr enhancements @@ -65,7 +66,7 @@ - + Add option to repmgr cluster show (GitHub #521). @@ -130,9 +131,7 @@ - 2 - - + diff --git a/repmgr-action-daemon.c b/repmgr-action-daemon.c index 50b26a27..079b04e0 100644 --- a/repmgr-action-daemon.c +++ b/repmgr-action-daemon.c @@ -433,6 +433,14 @@ do_daemon_start(void) } else { + /* + * repmgr will attempt to construct appropriate commands, but + * usually it's preferable for them to be explicitly defined, + * particularly if repmgr is installed from packages. + */ + log_warning(_("\"repmgrd_service_start_command\" is not set")); + log_hint(_("specify appropriate repmgrd start and stop commands in \"repmgr.conf\" for reliable operation")); + make_repmgrd_path(&repmgrd_command); } @@ -513,6 +521,9 @@ void do_daemon_stop(void) } else { + log_warning(_("\"repmgrd_service_stop_command\" is not set")); + log_hint(_("specify appropriate repmgrd start and stop commands in \"repmgr.conf\" for reliable operation")); + /* PID not known - attempt to retrieve repmgrd default PID */ if (pid == UNKNOWN_PID) {