fix for bug 3979: print a message with rnetboot/bootseq when gateway is empty

This commit is contained in:
ligc 2014-01-27 09:58:48 -06:00
parent 1e2fdb0529
commit 0a810645f2

7
xCAT-server/lib/perl/xCAT/PPC.pm Normal file → Executable file
View File

@ -1007,13 +1007,18 @@ sub resolve_netwk {
}
my $gateway = $nethash{$_}{gateway};
my $gateway_ip;
if ( defined( $gateway )) {
if ( defined( $gateway ) && $gateway) {
$ip = xCAT::NetworkUtils::toIP( $gateway );
if ( @$ip[0] != 0 ) {
send_msg( $request, 1, "$_: Cannot resolve '$gateway'" );
next;
}
$gateway_ip = @$ip[1];
} else {
# If the <xcatmaster> is the gateway, the ip forwarding must be enabled on the MN/SN,
# xCAT will setup the ipforarding automatically, but still see problems about the ip forwarding occassionally.
send_msg( $request, 1, "$_: No gateway defined for this node, check the networks table. If the gateway in the networks table is '<xcatmaster>', check the ip forwarding setup on the management node and service nodes.");
next;
}
my $netmask = $nethash{$_}{mask};