From a841e654d5af101bb600a74bf5abc282a902d80f Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 17 Apr 2009 20:29:52 +0000 Subject: [PATCH] (comments apply to 3214 and this one ,accidental 3214 checkin) -Allow getAllNodeAttribs to return in a hash organization through a new argument -Have nodeonmynet return true for any 'remote' node (makedhcp/nodeset fix for proxied networks) -rbeacon without argument now presumes stat for blades -KVM support now auto-generates as many macs as required to have a mac per nic -KVM plugin tracks and avoids collision of macs among the set xCAT manages git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3217 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 6 ++++-- xCAT-server/lib/xcat/plugins/dhcp.pm | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 0051afaca..94e6df04c 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -1952,6 +1952,7 @@ sub nodeonmynet my $noden = unpack("N", inet_aton($nodeip)); my @nets; if ($utildata->{nodeonmynetdata} and $utildata->{nodeonmynetdata}->{pid} == $$) { + @nets = @{$utildata->{nodeonmynetdata}->{nets}}; } else { @nets = split /\n/, `/sbin/ip route`; my $nettab=xCAT::Table->new("networks"); @@ -1964,11 +1965,12 @@ sub nodeonmynet $bits--; $curm=$curm>>1; } - push @nets,$_->{'net'}."/".$bits." remote"; + push @nets,$_->{'net'}."/".$bits." dev remote"; } } $utildata->{nodeonmynetdata}->{pid}=$$; - $utildata->{nodeonmynetdata}->{n} + $utildata->{nodeonmynetdata}->{nets} = \@nets; + } foreach (@nets) { my @elems = split /\s+/; diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 8ebd4d221..d84cc16db 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -16,7 +16,6 @@ use Fcntl ':flock'; my @dhcpconf; #Hold DHCP config file contents to be written back. my @nrn; # To hold output of networks table to be consulted throughout process -my $haveremotenics; my $domain; my $omshell; my $statements; #Hold custom statements to be slipped into host declarations @@ -475,7 +474,6 @@ sub process_request my $nm = $_->{mask}; #$callback->({data => ["array of nets $n : $if : $nm"]}); if ($if =~ /!remote!/) { #only take in networks with special interface - $haveremotenics=1; push @nrn, "$n:$if:$nm"; } } @@ -618,7 +616,7 @@ sub process_request } else { - unless ($haveremotenics or xCAT::Utils->nodeonmynet($_)) + unless (xCAT::Utils->nodeonmynet($_)) { next; }