--- a/heartbeat/ocf-shellfuncs.in 2020-06-16 10:47:54.462276461 +0200 +++ b/heartbeat/ocf-shellfuncs.in 2020-06-16 10:43:36.880739016 +0200 @@ -563,7 +563,7 @@ # (master/slave) resource. This is defined as a resource where the # master-max meta attribute is present, and set to greater than zero. ocf_is_ms() { - [ ! -z "${OCF_RESKEY_CRM_meta_master_max}" ] && [ "${OCF_RESKEY_CRM_meta_master_max}" -gt 0 ] + [ "${OCF_RESKEY_CRM_meta_promotable}" = "true" ] || { [ ! -z "${OCF_RESKEY_CRM_meta_master_max}" ] && [ "${OCF_RESKEY_CRM_meta_master_max}" -gt 0 ]; } } # version check functions --- a/heartbeat/pgsql 2020-06-16 10:47:54.474276441 +0200 +++ b/heartbeat/pgsql 2020-06-16 10:49:02.835159083 +0200 @@ -1021,7 +1021,7 @@ # I can't get master node name from $OCF_RESKEY_CRM_meta_notify_master_uname on monitor, # so I will get master node name using crm_mon -n - print_crm_mon | tr -d "\t" | tr -d " " | grep -q "^${RESOURCE_NAME}[(:].*[):].*Master" + print_crm_mon | grep -q -i -E "