From 5cf7a32be8d614e8cd89a01ac06e830cbd693929 Mon Sep 17 00:00:00 2001 From: Kaleb S KEITHLEY Date: Thu, 19 May 2016 14:24:08 -0400 Subject: common-ha: log flooded with Could not map name=xxxx to a UUID When the cluster is configured with long (FQDN) cluster members the log is flooded with "Could not map name=$shortname to a UUID" notices, and setting/getting the attribute is failing Change-Id: I954d8cef7115659cc9c8b23dae75a5a247dc5db7 BUG: 1337650 Signed-off-by: Kaleb S KEITHLEY Reviewed-on: http://review.gluster.org/14435 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: jiffin tony Thottan Reviewed-by: soumya k --- extras/ganesha/ocf/ganesha_mon | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'extras/ganesha/ocf/ganesha_mon') diff --git a/extras/ganesha/ocf/ganesha_mon b/extras/ganesha/ocf/ganesha_mon index dbb9eaaaccf..974eb86a07a 100644 --- a/extras/ganesha/ocf/ganesha_mon +++ b/extras/ganesha/ocf/ganesha_mon @@ -125,6 +125,7 @@ ganesha_mon_stop() ganesha_mon_monitor() { local short_host=$(hostname -s) + local long_host=$(hostname) local pid_file="/var/run/ganesha.nfsd.pid" # RHEL6 /etc/init.d/nfs-ganesha adds -p /var/run/ganesha.nfsd.pid @@ -153,10 +154,13 @@ ganesha_mon_monitor() # track grace-active crm_attr (attr != crm_attr) # we can't just use the attr as there's no way to query # its value in RHEL6 pacemaker - crm_attribute --node=${short_host} --lifetime=forever --name=${OCF_RESKEY_grace_active} --update=1 - if [ $? -ne 0 ]; then - ocf_log info "warning: crm_attribute --node=${short_host} --lifetime=forever --name=${OCF_RESKEY_grace_active} --update=1 failed" - fi + crm_attribute --node=${short_host} --lifetime=forever --name=${OCF_RESKEY_grace_active} --update=1 2> /dev/null + if [ $? -ne 0 ]; then + crm_attribute --node=${long_host} --lifetime=forever --name=${OCF_RESKEY_grace_active} --update=1 2> /dev/null + if [ $? -ne 0 ]; then + ocf_log info "warning: crm_attribute --node=${short_host} --lifetime=forever --name=${OCF_RESKEY_grace_active} --update=1 failed" + fi + fi return ${OCF_SUCCESS} fi @@ -178,10 +182,13 @@ ganesha_mon_monitor() ocf_log info "warning: attrd_updater -D -n ${OCF_RESKEY_grace_active} failed" fi - crm_attribute --node=${short_host} --name=${OCF_RESKEY_grace_active} --update=0 + crm_attribute --node=${short_host} --name=${OCF_RESKEY_grace_active} --update=0 2> /dev/null if [ $? -ne 0 ]; then - ocf_log info "warning: crm_attribute --node=${short_host} --name=${OCF_RESKEY_grace_active} --update=0 failed" - fi + crm_attribute --node=${long_host} --name=${OCF_RESKEY_grace_active} --update=0 2> /dev/null + if [ $? -ne 0 ]; then + ocf_log info "warning: crm_attribute --node=${short_host} --name=${OCF_RESKEY_grace_active} --update=0 failed" + fi + fi sleep ${OCF_RESKEY_grace_delay} -- cgit