From 5f57e0d3deedced625baf795a214e978b1ea6c65 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Tue, 29 Aug 2017 04:37:43 -0400 Subject: [PATCH 1/2] add log for hardware discovery when no ip address can be resolved for the pre-defined node --- xCAT-server/lib/xcat/plugins/nodediscover.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/nodediscover.pm b/xCAT-server/lib/xcat/plugins/nodediscover.pm index 21596f611..3291054f5 100644 --- a/xCAT-server/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server/lib/xcat/plugins/nodediscover.pm @@ -312,6 +312,9 @@ sub process_request { $hosttag = "$node-$ifinfo[1]"; push @hostnames_to_update, $hosttag; } + elsif (!inet_aton($node)) { + xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: Can not resolve IP for the matching node:$node, please makesure \"makehost $node\" and \"makedns $node\" have run before starting hardware discovery."); + } } #print Dumper($hosttag) . "\n"; if ($hosttag) { From c03ebcf340af86c60a9b67f0bff3650595b475d8 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Fri, 1 Sep 2017 00:54:38 -0400 Subject: [PATCH 2/2] Modify the spell error for the log when no ip address can be resolved for the pre-defined node --- xCAT-server/lib/xcat/plugins/nodediscover.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/nodediscover.pm b/xCAT-server/lib/xcat/plugins/nodediscover.pm index 3291054f5..9714f3843 100644 --- a/xCAT-server/lib/xcat/plugins/nodediscover.pm +++ b/xCAT-server/lib/xcat/plugins/nodediscover.pm @@ -313,7 +313,7 @@ sub process_request { push @hostnames_to_update, $hosttag; } elsif (!inet_aton($node)) { - xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: Can not resolve IP for the matching node:$node, please makesure \"makehost $node\" and \"makedns $node\" have run before starting hardware discovery."); + xCAT::MsgUtils->message("S", "xcat.discovery.nodediscover: Can not resolve IP for the matching node:$node. Make sure \"makehosts\" and \"makedns\" have been run for $node."); } } #print Dumper($hosttag) . "\n";