fix for bug 3217463: print an error message if ip_forwarding is not enabled but gateway is set to keyword <xcatmaster>
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9121 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
cfb3c68892
commit
b89cac9747
@ -444,6 +444,7 @@ sub process_request
|
||||
my $nodes = $flatreq->{node};
|
||||
|
||||
my $ip_forwarding_enabled = xCAT::NetworkUtils->ip_forwarding_enabled();
|
||||
my $gwerr = 0;
|
||||
foreach my $fnode (keys %{$nethash})
|
||||
{
|
||||
if($nethash->{$fnode}->{'myselfgw'} eq '1')
|
||||
@ -454,10 +455,21 @@ sub process_request
|
||||
}
|
||||
else
|
||||
{
|
||||
$gwerr = 1;
|
||||
$nethash->{$fnode}->{'gateway'} = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($gwerr == 1)
|
||||
{
|
||||
my $rsp;
|
||||
|
||||
my $name = hostname();
|
||||
my $msg = "The ipforwarding is not enabled on $name, it will not be able to act as default gateway for the compute nodes, check the ipforward setting in servicenode table or enable ipforwarding manually.\n";
|
||||
push @{$rsp->{data}}, $msg;
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback);
|
||||
}
|
||||
|
||||
# figure out which cmd and call the subroutine to process
|
||||
if ($command eq "mkdsklsnode")
|
||||
|
Loading…
x
Reference in New Issue
Block a user