YARN-5299. Log Docker run command when container fails. Contributed by Varun Vasudev.
This commit is contained in:
parent
2bbc3ea1b5
commit
dbe97aa768
@ -416,6 +416,10 @@ public void launchContainer(ContainerRuntimeContext ctx)
|
||||
if (tcCommandFile != null) {
|
||||
launchOp.appendArgs(tcCommandFile);
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Launching container with cmd: " + runCommand
|
||||
.getCommandWithArguments());
|
||||
}
|
||||
|
||||
try {
|
||||
privilegedOperationExecutor.executePrivilegedOperation(null,
|
||||
@ -423,6 +427,7 @@ public void launchContainer(ContainerRuntimeContext ctx)
|
||||
false, false);
|
||||
} catch (PrivilegedOperationException e) {
|
||||
LOG.warn("Launch container failed. Exception: ", e);
|
||||
LOG.info("Docker command used: " + runCommand.getCommandWithArguments());
|
||||
|
||||
throw new ContainerExecutionException("Launch container failed", e
|
||||
.getExitCode(), e.getOutput(), e.getErrorOutput());
|
||||
|
Loading…
Reference in New Issue
Block a user