mirror of https://github.com/apache/cloudstack.git
agent: increase timeout for host arch retrieval (#11254)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
b479d37b87
commit
44f80648a9
|
|
@ -97,7 +97,6 @@ import com.cloud.utils.nio.Link;
|
|||
import com.cloud.utils.nio.NioClient;
|
||||
import com.cloud.utils.nio.NioConnection;
|
||||
import com.cloud.utils.nio.Task;
|
||||
import com.cloud.utils.script.OutputInterpreter;
|
||||
import com.cloud.utils.script.Script;
|
||||
|
||||
/**
|
||||
|
|
@ -614,9 +613,9 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
|||
}
|
||||
|
||||
protected String getAgentArch() {
|
||||
final Script command = new Script("/usr/bin/arch", 500, logger);
|
||||
final OutputInterpreter.OneLineParser parser = new OutputInterpreter.OneLineParser();
|
||||
return command.execute(parser);
|
||||
String arch = Script.runSimpleBashScript(Script.getExecutableAbsolutePath("arch"), 1000);
|
||||
logger.debug("Arch for agent: {} found: {}", _name, arch);
|
||||
return arch;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class KVMHostInfo {
|
|||
private long reservedMemory;
|
||||
private long overCommitMemory;
|
||||
private List<String> capabilities = new ArrayList<>();
|
||||
private static String cpuArchCommand = "/usr/bin/arch";
|
||||
private static String cpuArchRetrieveExecutable = "arch";
|
||||
private static List<String> cpuInfoFreqFileNames = List.of("/sys/devices/system/cpu/cpu0/cpufreq/base_frequency","/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq");
|
||||
|
||||
public KVMHostInfo(long reservedMemory, long overCommitMemory, long manualSpeed, int reservedCpus) {
|
||||
|
|
@ -255,6 +255,6 @@ public class KVMHostInfo {
|
|||
|
||||
private String getCPUArchFromCommand() {
|
||||
LOGGER.info("Fetching host CPU arch");
|
||||
return Script.runSimpleBashScript(cpuArchCommand);
|
||||
return Script.runSimpleBashScript(Script.getExecutableAbsolutePath(cpuArchRetrieveExecutable));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue