summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S KEITHLEY <kkeithle@redhat.com>2016-05-19 14:29:20 -0400
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-05-23 02:36:33 -0700
commit2f278fa9b91b7e81e0d93ec44f486f12bdc3f50b (patch)
tree10692c0f475766bb2016f3bfe76669877c2c1cf7
parent33aad915e4187c9ca5fdff593c08c361cfa4b2f6 (diff)
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 Backport of: > Change-Id: I954d8cef7115659cc9c8b23dae75a5a247dc5db7 > Reviewed-on: http://review.gluster.org/14435 > BUG: 1337650 > Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Change-Id: I954d8cef7115659cc9c8b23dae75a5a247dc5db7 BUG: 1337652 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14436 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--extras/ganesha/ocf/ganesha_grace18
-rw-r--r--extras/ganesha/ocf/ganesha_mon21
2 files changed, 30 insertions, 9 deletions
diff --git a/extras/ganesha/ocf/ganesha_grace b/extras/ganesha/ocf/ganesha_grace
index 7c629f5e773..dc4d6577daa 100644
--- a/extras/ganesha/ocf/ganesha_grace
+++ b/extras/ganesha/ocf/ganesha_grace
@@ -95,9 +95,16 @@ ganesha_grace_start()
{
local rc=${OCF_ERR_GENERIC}
local short_host=$(hostname -s)
+ local long_host=$(hostname)
ocf_log debug "ganesha_grace_start()"
- attr=$(crm_attribute --query --node=${short_host} --name=${OCF_RESKEY_grace_active})
+ attr=$(crm_attribute --query --node=${short_host} --name=${OCF_RESKEY_grace_active} 2> /dev/null)
+ if [ $? -ne 0 ]; then
+ attr=$(crm_attribute --query --node=${long_host} --name=${OCF_RESKEY_grace_active} 2> /dev/null )
+ if [ $? -ne 0 ]; then
+ ocf_log info "crm_attribute --query --node=${short_host} --name=${OCF_RESKEY_grace_active} failed"
+ fi
+ fi
# Three possibilities:
# 1. There is no attribute at all and attr_updater returns
@@ -153,10 +160,17 @@ ganesha_grace_monitor()
{
local rc=${OCF_ERR_GENERIC}
local short_host=$(hostname -s)
+ local long_host=$(hostname)
ocf_log debug "monitor"
- attr=$(crm_attribute --query --node=${short_host} --name=${OCF_RESKEY_grace_active})
+ attr=$(crm_attribute --query --node=${short_host} --name=${OCF_RESKEY_grace_active} 2> /dev/null)
+ if [ $? -ne 0 ]; then
+ attr=$(crm_attribute --query --node=${long_host} --name=${OCF_RESKEY_grace_active} 2> /dev/null)
+ if [ $? -ne 0 ]; then
+ ocf_log info "crm_attribute --query --node=${short_host} --name=${OCF_RESKEY_grace_active} failed"
+ fi
+ fi
# if there is no attribute (yet), maybe it's because
# this RA started before ganesha_mon (nfs-mon) has had
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}