if (isTimeoutPending(timeStart)) {
return newStackWithStatus(StackStatus.UPDATE_ROLLBACK_FAILED,
"stack update timeout");
}
Stack stack = null;
try {
stack = findStack();
} catch (final Exception e) {
return newStackWithStatus(StackStatus.UPDATE_ROLLBACK_FAILED,
e.toString());
}
if (!isStackValid(stack)) {
return newStackWithStatus(StackStatus.UPDATE_ROLLBACK_FAILED,
"stack update invalid/missing");
}
final StackStatus status = StackStatus.fromValue(stack
.getStackStatus());
switch (status) {
case UPDATE_IN_PROGRESS:
final long timeCurrent = System.currentTimeMillis();