fix NIM if1 parsing and chk_resolv_conf (3162 & 3163)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14267 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
nott 2012-11-07 18:27:13 +00:00
parent d31122325b
commit b8b4c75c39

View File

@ -770,15 +770,12 @@ sub nimnodeset
#
# See if we need to create a resolv_conf resource
#
my $RChash;
$RChash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !$RChash ){
my $rsp;
push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
my %resolv_conf_hash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !%resolv_conf_hash ){
# my $rsp;
# push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
# xCAT::MsgUtils->message("E", $rsp, $callback);
}
my %resolv_conf_hash = %{$RChash};
#
# Get a list of all nim resource types
@ -4632,7 +4629,7 @@ sub mk_resolv_conf_file
Returns:
- undef
- ptr to hash of resolv_conf resource names
- hash of resolv_conf resource names
=cut
#-----------------------------------------------------------------------------
@ -5094,7 +5091,7 @@ sub chk_resolv_conf
} # end if $create_res
} # end foreach node
return \%resolv_conf_hash;
return %resolv_conf_hash;
}
#----------------------------------------------------------------------------
@ -10897,14 +10894,12 @@ sub mkdsklsnode
#
# See if we need to create a resolv_conf resource
#
my $RChash;
$RChash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !$RChash ){
my $rsp;
push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
xCAT::MsgUtils->message("E", $rsp, $callback);
my %resolv_conf_hash = &chk_resolv_conf($callback, \%objhash, \@nodelist, \%nethash, \%imagehash, \%attrs, \%nodeosi, $subreq);
if ( !%resolv_conf_hash ){
# my $rsp;
# push @{$rsp->{data}}, "Could not check NIM resolv_conf resource.\n";
# xCAT::MsgUtils->message("E", $rsp, $callback);
}
my %resolv_conf_hash = %{$RChash};
#
# define and initialize the diskless/dataless nodes
@ -12590,14 +12585,13 @@ sub checkNIMnetworks
xCAT::MsgUtils->message("E", $rsp, $callback);
return 1;
}
$ifone =~ s/$target:\s+//;
chomp $ifone;
my $junk1;
my $junk2;
my $adapterhost;
my @ifcontent = split('\n',$ifone);
foreach my $line (@ifcontent) {
$line =~ s/$target:\s+//;
next if ($line =~ /^#/);
($junk1, $junk2, $adapterhost) = split(':', $line);
last;