From f5b295d802b037dbb2b6741adca30999ba233751 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 7 Sep 2017 14:20:04 -0400 Subject: [PATCH 1/2] Update the message that returns back to the BMC in discovery to something that is more helpful to debug the problem --- xCAT-server/lib/xcat/plugins/bmcconfig.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcconfig.pm b/xCAT-server/lib/xcat/plugins/bmcconfig.pm index bf5ba3a8e..1e0dc388a 100644 --- a/xCAT-server/lib/xcat/plugins/bmcconfig.pm +++ b/xCAT-server/lib/xcat/plugins/bmcconfig.pm @@ -141,16 +141,16 @@ sub process_request { $clipassword = $password; } unless (defined $bmc) { - xCAT::MsgUtils->message('S', "Received request from host=$node but unable to determine $bmc_mgmt_type.bmc value for the node. Verify mgt attribute is configured correctly for the node and the BMC is defined."); - $callback->({ error => ["Unable to detect BMC configuration value for bmcconfig"], errorcode => [1] }); + xCAT::MsgUtils->message('S', "Received request from host=$node but unable to determine the $bmc_mgmt_type.bmc value for the node. Verify the node.mgt attribute is configured and the node.bmc is defined."); + $callback->({ error => ["No value specified for '$node.bmc'. Unable to configure the BMC, check the node definition."], errorcode => [1] }); return 1; } my $bmcport_counter = 0; foreach my $sbmc (split /,/, $bmc) { (my $ip, my $mask, my $gw) = net_parms($sbmc); unless ($ip and $mask and $username and $password) { - xCAT::MsgUtils->message('S', "Unable to determine IP, netmask, username, and/or pasword for $sbmc, ensure that host resolution is working. Best guess parameters would have been: IP: '$ip', netmask: '$mask', username: '$username', password: '$password'",); - $callback->({ error => ["Invalid table configuration for bmcconfig"], errorcode => [1] }); + xCAT::MsgUtils->message('S', "Unable to determine IP, Netmask, Username, or Password for $sbmc. Ensure that hostname resolution is working. [IP=$ip Netmask=$mask Username=$username Password=$password]",); + $callback->({ error => ["Invalid/Missing BMC related attributes in the node defintion (IP=$ip Netmask=$mask User=$username Pass=$password). Unable to configure the BMC, check the node definition."], errorcode => [1] }); return 1; } if ($request->{command}->[0] eq 'remoteimmsetup') { From 8829e3dca7d0a6e0c83772aa6849003e7c60b7b1 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 7 Sep 2017 15:50:11 -0400 Subject: [PATCH 2/2] Sync up the logging output --- xCAT-server/lib/xcat/plugins/bmcconfig.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcconfig.pm b/xCAT-server/lib/xcat/plugins/bmcconfig.pm index 1e0dc388a..2b60a1b1b 100644 --- a/xCAT-server/lib/xcat/plugins/bmcconfig.pm +++ b/xCAT-server/lib/xcat/plugins/bmcconfig.pm @@ -149,7 +149,7 @@ sub process_request { foreach my $sbmc (split /,/, $bmc) { (my $ip, my $mask, my $gw) = net_parms($sbmc); unless ($ip and $mask and $username and $password) { - xCAT::MsgUtils->message('S', "Unable to determine IP, Netmask, Username, or Password for $sbmc. Ensure that hostname resolution is working. [IP=$ip Netmask=$mask Username=$username Password=$password]",); + xCAT::MsgUtils->message('S', "Unable to determine IP, Netmask, Username, or Password for $sbmc. Ensure that hostname resolution is working. [IP=$ip Netmask=$mask User=$username Pass=$password]",); $callback->({ error => ["Invalid/Missing BMC related attributes in the node defintion (IP=$ip Netmask=$mask User=$username Pass=$password). Unable to configure the BMC, check the node definition."], errorcode => [1] }); return 1; }