Run pxe.pm on MN . Commment out preprocessing to send to service
nodes. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1159 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
b489ed4b1e
commit
1da375c859
@ -143,26 +143,28 @@ sub pass_along {
|
||||
|
||||
|
||||
|
||||
|
||||
sub preprocess_request {
|
||||
my $req = shift;
|
||||
$callback = shift;
|
||||
if ($req->{_xcatdest}) { return [$req]; } #Exit if the packet has been preprocessed in its history
|
||||
my @requests = ({%$req}); #Start with a straight copy to reflect local instance
|
||||
my $sitetab = xCAT::Table->new('site');
|
||||
(my $ent) = $sitetab->getAttribs({key=>'xcatservers'},'value');
|
||||
$sitetab->close;
|
||||
if ($ent and $ent->{value}) {
|
||||
foreach (split /,/,$ent->{value}) {
|
||||
if (xCAT::Utils->thishostisnot($_)) {
|
||||
my $reqcopy = {%$req};
|
||||
$reqcopy->{'_xcatdest'} = $_;
|
||||
push @requests,$reqcopy;
|
||||
}
|
||||
}
|
||||
}
|
||||
return \@requests;
|
||||
}
|
||||
# Removing hierarchy, command will be processed on the MN.
|
||||
# If hierachy is put back the code my change to use Utils->get_Servicenode
|
||||
# and not use xcatservers from the site table.
|
||||
#sub preprocess_request {
|
||||
# my $req = shift;
|
||||
# $callback = shift;
|
||||
# if ($req->{_xcatdest}) { return [$req]; } #Exit if the packet has been preprocessed in its history
|
||||
# my @requests = ({%$req}); #Start with a straight copy to reflect local instance
|
||||
# my $sitetab = xCAT::Table->new('site');
|
||||
# (my $ent) = $sitetab->getAttribs({key=>'xcatservers'},'value');
|
||||
# $sitetab->close;
|
||||
# if ($ent and $ent->{value}) {
|
||||
# foreach (split /,/,$ent->{value}) {
|
||||
# if (xCAT::Utils->thishostisnot($_)) {
|
||||
# my $reqcopy = {%$req};
|
||||
# $reqcopy->{'_xcatdest'} = $_;
|
||||
# push @requests,$reqcopy;
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# return \@requests;
|
||||
#}
|
||||
#sub preprocess_request {
|
||||
# my $req = shift;
|
||||
# my $callback = shift;
|
||||
|
Loading…
Reference in New Issue
Block a user