diff --git a/src/main/java/it/reply/orchestrator/service/deployment/providers/ChronosServiceImpl.java b/src/main/java/it/reply/orchestrator/service/deployment/providers/ChronosServiceImpl.java index 86f1c97add..85ceb8177e 100644 --- a/src/main/java/it/reply/orchestrator/service/deployment/providers/ChronosServiceImpl.java +++ b/src/main/java/it/reply/orchestrator/service/deployment/providers/ChronosServiceImpl.java @@ -20,6 +20,7 @@ import it.infn.ba.indigo.chronos.client.model.v1.Container; import it.infn.ba.indigo.chronos.client.model.v1.EnvironmentVariable; import it.infn.ba.indigo.chronos.client.model.v1.Job; +import it.infn.ba.indigo.chronos.client.model.v1.Parameters; import it.infn.ba.indigo.chronos.client.utils.ChronosException; import it.reply.orchestrator.controller.DeploymentController; import it.reply.orchestrator.dal.entity.Deployment; @@ -297,7 +298,7 @@ public boolean isDeployed(Deployment deployment) throws DeploymentException { updateOnError(deployment.getId(), dex); throw dex; } catch (RuntimeException ex) { - LOG.error("Failed to update deployment <{}>", ex); + LOG.error(String.format("Failed to update deployment <%s>", deployment.getId()), ex); return false; } @@ -803,6 +804,14 @@ protected Job createJob(Map nodes, String deploymentId, St Container container = new Container(); container.setType("DOCKER"); + // Run the container in Privileged Mode + Parameters param = new Parameters(); + param.setKey("privileged"); + param.setValue("true"); + Collection parameters = new ArrayList(); + parameters.add(param); + container.setParameters(parameters); + container .setImage((String) ((PropertyValue) nodeTemplate.getArtifacts().get("image").getFile()) .getValue()); @@ -847,4 +856,4 @@ public static JobState getLastState(Job job) { } } } -} +} \ No newline at end of file