Skip to content

Commit

Permalink
CODENVY-2284: Add additional logs if start from snapshot fail (eclips…
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorhun committed Jun 26, 2017
1 parent e30af7c commit 7b15c1e
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -940,17 +940,22 @@ private Instance startInstance(boolean recover,
}
} catch (NotFoundException e) {
try {
machineLogger.writeLine("Failed to boot machine from snapshot: snapshot not found. " +
"Machine will be created from origin source.");
machineLogger.writeLine(
format("Failed to boot machine %s of workspace %s, because snapshot not found. " +
"The machine will be created from origin source.",
machine.getConfig().getName(),
machine.getWorkspaceId()));
} catch (IOException ignore) { }
}
}

instance = machineStarter.startMachine(machineLogger, machineSource);
} catch (SourceNotFoundException e) {
if (recover) {
LOG.error("Image of snapshot for machine " + machine.getConfig().getName() +
" not found. " + "Machine will be created from origin source.");
LOG.error(format("The snapshot of the image for the machine %s of the workspace %s not found. " +
"The machine will be created from origin source.",
machine.getConfig().getName(),
machine.getWorkspaceId()));
machine = originMachine;
instance = machineStarter.startMachine(machineLogger, null);
} else {
Expand Down

0 comments on commit 7b15c1e

Please sign in to comment.