2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-29 06:18:14 +00:00

fix issue: genimage tries direct DB access instead of via xCATd #4385 (#4924)

This commit is contained in:
yangsong
2018-03-12 17:40:39 +08:00
committed by Bin Xu
parent 817c5c6e4c
commit 4ad99269fe

View File

@@ -116,7 +116,7 @@ if (@ARGV > 0) {
}
if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) {
my $tmpimgs = `lsdef -t osimage -w provmethod=~'/statelite|netboot/' |cut -d' ' -f1`;
my $tmpimgs = `XCATXMLTRACE=0 XCATBYPASS=0 lsdef -t osimage -w provmethod=~'/statelite|netboot/' |cut -d' ' -f1`;
if ($? == 0) {
if (($tmpimgs) && ($tmpimgs !~ /^Could/)) { #Could is returned when the osimage table is empty
my @images = split('\n', $tmpimgs);
@@ -162,8 +162,7 @@ if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) {
# get the install directory
my @entries = xCAT::TableUtils->get_site_attribute("installdir");
my $installdir = $entries[0];
my $installdir = `XCATXMLTRACE=0 XCATBYPASS=0 lsdef -t site -o clustersite -i installdir|grep -w 'installdir'|cut -d= -f2`;
chomp($installdir);
# lots of error checking to make sure it exists.