|
@@ -924,17 +924,17 @@ public class DockerLinuxContainerRuntime implements LinuxContainerRuntime {
|
|
@Override
|
|
@Override
|
|
public void relaunchContainer(ContainerRuntimeContext ctx)
|
|
public void relaunchContainer(ContainerRuntimeContext ctx)
|
|
throws ContainerExecutionException {
|
|
throws ContainerExecutionException {
|
|
- Container container = ctx.getContainer();
|
|
|
|
- String containerIdStr = container.getContainerId().toString();
|
|
|
|
|
|
+ ContainerId containerId = ctx.getContainer().getContainerId();
|
|
|
|
+ String containerIdStr = containerId.toString();
|
|
// Check to see if the container already exists for relaunch
|
|
// Check to see if the container already exists for relaunch
|
|
DockerCommandExecutor.DockerContainerStatus containerStatus =
|
|
DockerCommandExecutor.DockerContainerStatus containerStatus =
|
|
DockerCommandExecutor.getContainerStatus(containerIdStr, conf,
|
|
DockerCommandExecutor.getContainerStatus(containerIdStr, conf,
|
|
- privilegedOperationExecutor);
|
|
|
|
|
|
+ privilegedOperationExecutor, nmContext);
|
|
if (containerStatus != null &&
|
|
if (containerStatus != null &&
|
|
DockerCommandExecutor.isStartable(containerStatus)) {
|
|
DockerCommandExecutor.isStartable(containerStatus)) {
|
|
DockerStartCommand startCommand = new DockerStartCommand(containerIdStr);
|
|
DockerStartCommand startCommand = new DockerStartCommand(containerIdStr);
|
|
String commandFile = dockerClient.writeCommandToTempFile(startCommand,
|
|
String commandFile = dockerClient.writeCommandToTempFile(startCommand,
|
|
- containerIdStr);
|
|
|
|
|
|
+ containerId, nmContext);
|
|
PrivilegedOperation launchOp = buildLaunchOp(ctx, commandFile,
|
|
PrivilegedOperation launchOp = buildLaunchOp(ctx, commandFile,
|
|
startCommand);
|
|
startCommand);
|
|
|
|
|