driver patch code submit
This commit is contained in:
parent
acd44f27ee
commit
212e4ef603
@ -92,6 +92,7 @@ sub process_request {
|
||||
|
||||
my @commandslist;
|
||||
my %argslist;
|
||||
my $noupdate_flag = 0;
|
||||
my %msghash = ( "makehosts" => "Updating hosts entries",
|
||||
"makedns" => "Updating DNS entries",
|
||||
"makedhcp" => "Update DHCP entries",
|
||||
@ -143,6 +144,10 @@ sub process_request {
|
||||
if($macflag)
|
||||
{
|
||||
if ($chainarray[0]){
|
||||
if($chainarray[0] =~ m/^osimage=/)
|
||||
{
|
||||
$noupdate_flag = 1;
|
||||
}
|
||||
push @commandslist, ['nodeset', $chainarray[0]];
|
||||
}
|
||||
}
|
||||
@ -161,6 +166,7 @@ sub process_request {
|
||||
my $firstnode = (@$nodelist)[0];
|
||||
if (exists $profilehash{$firstnode}{"ImageProfile"}){
|
||||
my $osimage = 'osimage='.$profilehash{$firstnode}{"ImageProfile"};
|
||||
$noupdate_flag = 1;
|
||||
push @commandslist, ['nodeset', $osimage];
|
||||
}
|
||||
}
|
||||
@ -170,7 +176,14 @@ sub process_request {
|
||||
my $current_cmd = $_->[0];
|
||||
my $current_args = $_->[1];
|
||||
setrsp_progress($msghash{$current_cmd});
|
||||
my $retref = xCAT::Utils->runxcmd({command=>[$current_cmd], node=>$nodelist, arg=>[$current_args]}, $request_command, 0, 2);
|
||||
if(($current_cmd eq "nodeset") && $noupdate_flag)
|
||||
{
|
||||
$retref = xCAT::Utils->runxcmd({command=>[$current_cmd], node=>$nodelist, arg=>[$current_args, "--noupdateinitrd"]}, $request_command, 0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
$retref = xCAT::Utils->runxcmd({command=>[$current_cmd], node=>$nodelist, arg=>[$current_args]}, $request_command, 0, 2);
|
||||
}
|
||||
log_cmd_return($retref);
|
||||
}
|
||||
|
||||
|
@ -571,6 +571,7 @@ sub nextdestiny {
|
||||
}
|
||||
|
||||
my $node;
|
||||
my $noupdate_flag = 0;
|
||||
$chaintab = xCAT::Table->new('chain');
|
||||
my $chainents = $chaintab->getNodesAttribs(\@nodes,[qw(currstate currchain chain)]);
|
||||
foreach $node (@nodes) {
|
||||
@ -598,13 +599,28 @@ sub nextdestiny {
|
||||
my %requ;
|
||||
$requ{node}=[$node];
|
||||
$requ{arg}=[$ref->{currstate}];
|
||||
if($ref->{currstate} =~ /noupdateinitrd$/)
|
||||
{
|
||||
my @items = split /[:]/,$ref->{currstate};
|
||||
$requ{arg}= \@items;
|
||||
$noupdate_flag = 1;
|
||||
}
|
||||
setdestiny(\%requ, $flag+1);
|
||||
}
|
||||
|
||||
if ($callnodeset) {
|
||||
$args;
|
||||
if($noupdate_flag)
|
||||
{
|
||||
$args = ['enact', '--noupdateinitrd'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$args = ['enact'];
|
||||
}
|
||||
$subreq->({command=>['nodeset'],
|
||||
node=> \@nodes,
|
||||
arg=>['enact']});
|
||||
arg=>$args});
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user