From 6a869e219b9969e153c33684da02036070ff835e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 18 Mar 2009 17:26:37 +0000 Subject: [PATCH] -Log when BMC address requested that cannot be resolved to an IP git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2932 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/bmcconfig.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/bmcconfig.pm b/xCAT-server/lib/xcat/plugins/bmcconfig.pm index 5e766c54d..e1826e2d1 100644 --- a/xCAT-server/lib/xcat/plugins/bmcconfig.pm +++ b/xCAT-server/lib/xcat/plugins/bmcconfig.pm @@ -132,6 +132,11 @@ sub process_request { return 1; } (my $ip,my $mask,my $gw) = net_parms($bmc); + unless ($ip and $mask and $username and $password) { + xCAT::MsgUtils->message('S',"Unable to determine IP, netmask, username, and/or pasword for $bmc, ensure that host resolution is working. Best guess parameters would have been: IP: '$ip', netmask: '$netmask', username: '$username', password: '$password'", ); + $callback->({error=>["Invalid table configuration for bmcconfig"],errorcode=>[1]}); + return 1; + } my $response={bmcip=>$ip,netmask=>$mask,gateway=>$gw,username=>$username,password=>$password}; if (defined $bmcport) { $response->{bmcport}=$bmcport;