merge 2.8.2-pcm code change from qing
This commit is contained in:
parent
3a4b586ea9
commit
712ac48e82
@ -171,14 +171,12 @@ sub process_request {
|
||||
# Do the check
|
||||
my $imageprofile = parse_str_arg($request->{arg}->[0]);
|
||||
|
||||
my $kitdata = undef;
|
||||
if (! exists($request->{kitdata}))
|
||||
{
|
||||
$rsp->{data}->[0] = "Skipped running \"$command\" plugin command for \"$PLUGIN_KITNAME\" kit.";
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
return;
|
||||
$kitdata = $request->{kitdata};
|
||||
}
|
||||
my $kitdata = $request->{kitdata};
|
||||
if (! defined($kitdata) && !($command eq "kitimagepostdelete")) {
|
||||
if (! defined($kitdata) && ! ($command eq 'kitimagepostdelete')) {
|
||||
$kitdata = xCAT::KitPluginUtils->get_kits_used_by_image_profiles([$imageprofile]);
|
||||
$request->{kitdata} = $kitdata;
|
||||
}
|
||||
|
@ -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,15 @@ 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);
|
||||
$retref = "";
|
||||
if(($current_cmd eq "nodeset") && $noupdate_flag)
|
||||
{
|
||||
$retref = xCAT::Utils->runxcmd({command=>[$current_cmd], node=>$nodelist, arg=>[$current_args, "--noupdateinitrd"]}, $reques t_command, 0, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
$retref = xCAT::Utils->runxcmd({command=>[$current_cmd], node=>$nodelist, arg=>[$current_args]}, $request_command, 0, 2);
|
||||
}
|
||||
log_cmd_return($retref);
|
||||
}
|
||||
|
||||
|
@ -576,13 +576,18 @@ sub nextdestiny {
|
||||
my %requ;
|
||||
$requ{node}=[$node];
|
||||
$requ{arg}=[$ref->{currstate}];
|
||||
if($ref->{currstate} =~ /noupdateinitrd$/)
|
||||
{
|
||||
my @items = split /[:]/,$ref->{currstate};
|
||||
$requ{arg}= \@items;
|
||||
}
|
||||
setdestiny(\%requ, $flag+1);
|
||||
}
|
||||
|
||||
if ($callnodeset) {
|
||||
$subreq->({command=>['nodeset'],
|
||||
node=> \@nodes,
|
||||
arg=>['enact']});
|
||||
arg=>['enact', '--noupdateinitrd']});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1790,11 +1790,11 @@ sub gen_new_hostinfo_dict{
|
||||
|
||||
if (exists $chain->{'chain'}) {
|
||||
my $hardwareprofile_chain = $chain->{'chain'};
|
||||
$hostinfo_dict{$item}{"chain"} = $hardwareprofile_chain.',osimage='.$provmethod;
|
||||
$hostinfo_dict{$item}{"chain"} = $hardwareprofile_chain.',osimage='.$provmethod.":--noupdateinitrd";
|
||||
}
|
||||
|
||||
else {
|
||||
$hostinfo_dict{$item}{"chain"} = 'osimage='.$provmethod;
|
||||
$hostinfo_dict{$item}{"chain"} = 'osimage='.$provmethod.":--noupdateinitrd";
|
||||
}
|
||||
|
||||
if (exists $netprofileattr{"bmc"}){ # Update BMC records.
|
||||
|
Loading…
Reference in New Issue
Block a user