2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #3857 from immarvin/onissue

fix issue [fvt] xcatd in SN did not load the latest version file after xcat upgrade in SN #3855
This commit is contained in:
chenglch 2017-09-06 18:13:34 +08:00 committed by GitHub
commit 619c275d73

View File

@ -19,6 +19,7 @@ use lib "$::XCATROOT/lib/perl";
# needing it to avoid reprocessing of user tables ( ExtTab.pm) for each command call
use POSIX qw(ceil);
use File::Path;
#use Data::Dumper;
use Socket;
use strict;
use Symbol;
@ -42,7 +43,6 @@ require xCAT::InstUtils;
#require xCAT::NetworkUtils;
require xCAT::Schema;
#require Data::Dumper;
require xCAT::NodeRange;
require xCAT::Version;
require DBI;
@ -575,6 +575,13 @@ sub isLinux
sub Version
{
my $version = shift;
#force reload the xCAT::Version in case the perl-xcat is upgraded but xcatd is not restarted
if($INC{'xCAT/Version.pm'}){
delete $INC{'xCAT/Version.pm'};
}
require xCAT::Version;
$version = xCAT::Version->Version();
return $version;
}