Skip to content

Commit ee99263

Browse files
set wait on command only when granular wait is defined. This is to keep the backward compatibility
1 parent 8754714 commit ee99263

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ public Answer[] send(final Long hostId, final Commands commands, int timeout) th
495495
int wait = getTimeout(commands, timeout);
496496
logger.debug(String.format("Wait time setting on %s is %d seconds", commands, wait));
497497
for (Command cmd : commands) {
498-
cmd.setWait(wait);
498+
String simpleCommandName = cmd.getClass().getSimpleName();
499+
Integer commandTimeout = _commandTimeouts.get(simpleCommandName);
500+
if (commandTimeout != null) {
501+
cmd.setWait(wait);
502+
}
499503
}
500504

501505
if (CheckTxnBeforeSending.value()) {

0 commit comments

Comments
 (0)