2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-24 12:10:25 +00:00

Merge pull request #678 from hu-weihua/cmdlog

Fix issue667: command log writer process failed to start in xcat docker container
This commit is contained in:
yangsong
2016-01-29 09:43:34 +08:00

View File

@@ -51,6 +51,7 @@ my $arch = `uname -p`;
unless (($^O =~ /^aix/i) || ($os =~ /^sle[sc]10/) || (($os =~ /^rh.*5$/) && ($arch =~ /ppc64/))){
eval {require IO::Uncompress::Gunzip;}
}
use File::Basename;
use File::Path;
use Time::HiRes qw(sleep);
use Thread qw(yield);
@@ -1128,6 +1129,9 @@ unless ($cmdlog_svrpid){
exit(0);
}
my $cmdlog_logfile_path=dirname($cmdlog_logfile);
mkpath("$cmdlog_logfile_path") unless(-d "$cmdlog_logfile_path");
unless (open ($cmdlogfile, ">>$cmdlog_logfile")) {
xCAT::MsgUtils->trace(0,"E","xcatd: Can't open xcat command log file $cmdlog_logfile,command log process $$ stop.");
if($cmdlogsvrlistener){close($cmdlogsvrlistener);}