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.
This commit is contained in:
Ian Barwick
2019-01-29 14:08:00 +09:00
parent 7654dd615b
commit a5aa47c1dd
2 changed files with 14 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
<para> <para>
&repmgr; 4.3 is a major release. &repmgr; 4.3 is a major release.
</para> </para>
<sect2> <sect2>
<title>repmgr enhancements</title> <title>repmgr enhancements</title>
<para> <para>
@@ -65,7 +66,7 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Add <option>--terse</option> option to <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command> (GitHub #521). Add <option>--terse</option> option to <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command> (GitHub #521).
</para> </para>
<para> <para>
@@ -130,9 +131,7 @@
</itemizedlist> </itemizedlist>
</para> </para>
</sect>2 </sect2>
</sect1> </sect1>

View File

@@ -433,6 +433,14 @@ do_daemon_start(void)
} }
else 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); make_repmgrd_path(&repmgrd_command);
} }
@@ -513,6 +521,9 @@ void do_daemon_stop(void)
} }
else 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 */ /* PID not known - attempt to retrieve repmgrd default PID */
if (pid == UNKNOWN_PID) if (pid == UNKNOWN_PID)
{ {