# HG changeset patch
# User Dag Stenstad <[email protected]>
# Date 1273102293 -7200
# Node ID 940da087b6b7c9dc0c2817691e408d169687b34e
# Parent  82e2fcb22863c504182f51a3d8f714077d5fe4c2
Low: RA: VirtualDomain: Add more error handling and logging to 
VirtualDomain_Migrate_To.

diff -r 82e2fcb22863 -r 940da087b6b7 heartbeat/VirtualDomain
--- a/heartbeat/VirtualDomain   Thu May 06 01:07:47 2010 +0200
+++ b/heartbeat/VirtualDomain   Thu May 06 01:31:33 2010 +0200
@@ -294,8 +294,21 @@ VirtualDomain_Migrate_To() {
 
     target_node="$OCF_RESKEY_CRM_meta_migrate_target"
     if ocf_is_true $OCF_RESKEY_migrate_use_fqdn; then
+        if [ ! $(which host) ]; then
+            ocf_log error "The host binary is not in the path."
+            ocf_log debug "Check your distribution for the correct package to 
install."
+            ocf_log debug "In Debian/Ubuntu: bind9-host"
+            ocf_log debug "In RHEL/Centos: bind-utils"
+            exit $OCF_ERR_CONFIGURED
+        fi
         target_node=$(host $OCF_RESKEY_CRM_meta_migrate_target | \
         awk '{ print $1; }')
+        if [ ${target_node} = "Host" ]; then
+            ocf_log error "Unable to resolve migrate target FQDN."
+            ocf_log debug "This is probably due to a misconfigured 
/etc/resolv.conf, missing"
+            ocf_log debug "entries in /etc/hosts or a generally broken DNS 
setup."
+            exit $OCF_ERR_CONFIGURED
+        fi
     fi
 
     if VirtualDomain_Status; then
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to