mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-12 17:30:19 +00:00
enable ipmi raw data if xcatdebugmodel set
This commit is contained in:
@ -15,6 +15,7 @@ use lib "$::XCATROOT/lib/perl";
|
||||
use strict;
|
||||
use warnings "all";
|
||||
use Time::HiRes qw/time/;
|
||||
use xCAT::SvrUtils;
|
||||
|
||||
use IO::Socket::INET qw/!AF_INET6 !PF_INET6/;
|
||||
my $initialtimeout = 0.5;
|
||||
@ -415,6 +416,10 @@ sub subcmd {
|
||||
my %args = @_;
|
||||
$self->{expectedcmd} = $args{command};
|
||||
$self->{expectednetfn} = $args{netfn} + 1;
|
||||
if ($self->{onlogon_args}->{xcatdebugmodel}) {
|
||||
my $msg = sprintf ("The command running: $self->{onlogon_args}->{command}:$self->{onlogon_args}->{subcommand}(@{$self->{onlogon_args}->{extraargs}}), the raw data: netfn(0x%02x), cmd(0x%02x)", $args{netfn}, $args{command});
|
||||
xCAT::SvrUtils::sendmsg([0, $msg], $self->{onlogon_args}->{outfunc});
|
||||
}
|
||||
my $seqincrement = 7;
|
||||
while ($tabooseq{ $self->{expectednetfn} }->{ $self->{expectedcmd} }->{ $self->{seqlun} } and $seqincrement) { #avoid using a seqlun formerly marked 'taboo', but don't advance by more than 7, just in case
|
||||
$tabooseq{ $self->{expectednetfn} }->{ $self->{expectedcmd} }->{ $self->{seqlun} }--; #forgive a taboo lun over time...
|
||||
|
@ -43,6 +43,7 @@ my %allerrornodes = ();
|
||||
my %newnodestatus = ();
|
||||
my $global_sessdata;
|
||||
my %child_pids;
|
||||
my $xcatdebugmodel = 0;
|
||||
|
||||
my $IPMIXCAT = "/opt/xcat/bin/ipmitool-xcat";
|
||||
my $NON_BLOCK = 1;
|
||||
@ -8162,6 +8163,7 @@ sub process_request {
|
||||
if ($::XCATSITEVALS{ipmitimeout}) { $ipmitimeout = $::XCATSITEVALS{ipmitimeout} }
|
||||
if ($::XCATSITEVALS{ipmiretries}) { $ipmitrys = $::XCATSITEVALS{ipmitretries} }
|
||||
if ($::XCATSITEVALS{ipmisdrcache}) { $enable_cache = $::XCATSITEVALS{ipmisdrcache} }
|
||||
if ($::XCATSITEVALS{xcatdebugmodel}) { $xcatdebugmodel = $::XCATSITEVALS{xcatdebugmodel} }
|
||||
|
||||
#my @threads;
|
||||
my @donargs = ();
|
||||
@ -8375,6 +8377,8 @@ sub donode {
|
||||
command => $command,
|
||||
extraargs => \@exargs,
|
||||
subcommand => $exargs[0],
|
||||
xcatdebugmodel => $xcatdebugmodel,
|
||||
outfunc => $callback,
|
||||
};
|
||||
if ($sessiondata{$node}->{ipmisession}->{error}) {
|
||||
xCAT::SvrUtils::sendmsg([ 1, $sessiondata{$node}->{ipmisession}->{error} ], $callback, $node, %allerrornodes);
|
||||
|
Reference in New Issue
Block a user