From b78c5e48568f97415de03f68d0c8b747229c4281 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Wed, 22 Mar 2017 15:46:50 +0100 Subject: [PATCH] Add support for rndc options in named resource agent. --- heartbeat/named | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/heartbeat/named b/heartbeat/named index 2118e0c..4856cdc 100755 --- a/heartbeat/named +++ b/heartbeat/named @@ -25,6 +25,7 @@ OCF_RESKEY_named_pidfile_default="/var/run/named/named.pid" OCF_RESKEY_named_rootdir_default="" OCF_RESKEY_named_options_default="" OCF_RESKEY_named_keytab_file_default="" +OCF_RESKEY_rndc_options_default="" OCF_RESKEY_monitor_request_default="localhost" OCF_RESKEY_monitor_response_default="127.0.0.1" OCF_RESKEY_monitor_ip_default="127.0.0.1" @@ -38,6 +39,7 @@ OCF_RESKEY_monitor_ip_default="127.0.0.1" : ${OCF_RESKEY_named_rootdir=${OCF_RESKEY_named_rootdir_default}} : ${OCF_RESKEY_named_options=${OCF_RESKEY_named_options_default}} : ${OCF_RESKEY_named_keytab_file=${OCF_RESKEY_named_keytab_file_default}} +: ${OCF_RESKEY_rndc_options=${OCF_RESKEY_rndc_options_default}} : ${OCF_RESKEY_monitor_request=${OCF_RESKEY_monitor_request_default}} : ${OCF_RESKEY_monitor_response=${OCF_RESKEY_monitor_response_default}} : ${OCF_RESKEY_monitor_ip=${OCF_RESKEY_monitor_ip_default}} @@ -144,6 +146,14 @@ named service keytab file (for GSS-TSIG). + + +Options for rndc process if any. + +rndc_options + + + Request that shall be sent to named for monitoring. Usually an A record in DNS. @@ -326,7 +336,7 @@ named_monitor() { # named_reload() { - $OCF_RESKEY_rndc reload >/dev/null || return $OCF_ERR_GENERIC + $OCF_RESKEY_rndc $OCF_RESKEY_rndc_options reload >/dev/null || return $OCF_ERR_GENERIC return $OCF_SUCCESS } @@ -396,7 +406,7 @@ named_stop () { named_status || return $OCF_SUCCESS - $OCF_RESKEY_rndc stop >/dev/null + $OCF_RESKEY_rndc $OCF_RESKEY_rndc_options stop >/dev/null if [ $? -ne 0 ]; then ocf_log info "rndc stop failed. Killing named." kill `cat ${OCF_RESKEY_named_pidfile}`