From b89cac974798dd34339fbb4c06c227530b1539a7 Mon Sep 17 00:00:00 2001 From: ligc Date: Tue, 22 Mar 2011 03:16:53 +0000 Subject: [PATCH] fix for bug 3217463: print an error message if ip_forwarding is not enabled but gateway is set to keyword git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9121 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index d6125206b..e516b77bc 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -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")