Fix some warning messages, cause nodeset to abort if requesting impossible install

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@299 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-01-19 16:38:03 +00:00
parent a67f1a4411
commit 2333656fb6
6 changed files with 12 additions and 7 deletions

View File

@ -87,6 +87,10 @@ sub process_request {
}
unless (grep /^-n$/,@args) {
my $nettab = xCAT::Table->new('networks');
unless ($nettab) {
$callback->({error=>"Unable to open networks table, has makenetworks been run?"});
return;
}
foreach (@{$nettab->getAllEntries()}) {
push @args,"-n";
push @args,$_->{net}.":".$_->{mask}

View File

@ -212,7 +212,7 @@ sub mkinstall {
my $ent = $restab->getNodeAttribs($node,['nfsserver','serialport','primarynic','installnic']);
my $sent = $hmtab->getNodeAttribs($node,['serialspeed','serialflow']);
unless ($ent and $ent->{nfsserver}) {
$callback->({error=>["No noderes.nfsserver defined for ".$ent->{profile}],errorcode=>[1]});
$callback->({error=>["No noderes.nfsserver defined for ".$node],errorcode=>[1]});
next;
}
my $kcmdline="nofb utf8 ks=http://".$ent->{nfsserver}."/install/autoinst/".$node;

View File

@ -59,13 +59,14 @@ sub setdestiny {
my $ntent = $nodetype->getNodeAttribs($_,[qw(os arch profile)]);
if ($ntent and $ntent->{os}) {
$nstates{$_} .= " ".$ntent->{os};
}
} else { $errored =1; $callback->({error=>"nodetype.os not defined for $_"}); }
if ($ntent and $ntent->{arch}) {
$nstates{$_} .= "-".$ntent->{arch};
}
} else { $errored =1; $callback->({error=>"nodetype.arch not defined for $_"}); }
if ($ntent and $ntent->{profile}) {
$nstates{$_} .= "-".$ntent->{profile};
}
} else { $errored =1; $callback->({error=>"nodetype.profile not defined for $_"}); }
if ($errored) {return;}
unless ($state =~ /^netboot/) { $chaintab->setNodeAttribs($_,{currchain=>"boot"}); };
}
} elsif ($state eq "shell" or $state eq "standby" or $state =~ /^runcmd/) {

View File

@ -224,7 +224,7 @@ sub mkinstall {
my $hmtab = xCAT::Table->new('nodehm');
my $sent = $hmtab->getNodeAttribs($node,['serialspeed','serialflow']);
unless ($ent and $ent->{nfsserver}) {
$callback->({error=>["No noderes.nfsserver defined for ".$ent->{profile}],errorcode=>[1]});
$callback->({error=>["No noderes.nfsserver defined for ".$node],errorcode=>[1]});
next;
}
my $kcmdline="nofb utf8 ks=http://".$ent->{nfsserver}."/install/autoinst/".$node;

View File

@ -227,7 +227,7 @@ sub mkinstall {
my $hmtab = xCAT::Table->new('nodehm');
my $sent = $hmtab->getNodeAttribs($node,['serialspeed','serialflow']);
unless ($ent and $ent->{nfsserver}) {
$callback->({error=>["No noderes.nfsserver defined for ".$ent->{profile}],errorcode=>[1]});
$callback->({error=>["No noderes.nfsserver defined for ".$node],errorcode=>[1]});
next;
}
my $kcmdline="nofb utf8 ks=http://".$ent->{nfsserver}."/install/autoinst/".$node;

View File

@ -93,7 +93,7 @@ sub mkinstall {
my $ent = $restab->getNodeAttribs($node,['nfsserver','serialport','primarynic','installnic']);
my $sent = $hmtab->getNodeAttribs($node,['serialspeed','serialflow']);
unless ($ent and $ent->{nfsserver}) {
$callback->({error=>["No server for $node defined"],errorcode=>[1]});
$callback->({error=>["No noderes.nfsserver for $node defined"],errorcode=>[1]});
next;
}
my $kcmdline="autoyast=http://".$ent->{nfsserver}."/install/autoinst/".$node." install=http://".$ent->{nfsserver}."/install/$os/$arch/1";