From 17cab6e932c4294ff14c0446a0ada24efeb2f1d3 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Tue, 8 Nov 2016 12:28:43 -0800 Subject: [PATCH] Fix env vars relating to secretdir --- client/driver/docker.go | 2 +- client/driver/executor/executor_linux.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/driver/docker.go b/client/driver/docker.go index a77a27f88..41a8b9b67 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -466,7 +466,7 @@ func (d *DockerDriver) createContainerConfig(ctx *ExecContext, task *structs.Tas // Set environment variables. d.taskEnv.SetAllocDir(allocdir.SharedAllocContainerPath) d.taskEnv.SetTaskLocalDir(allocdir.TaskLocalContainerPath) - d.taskEnv.SetTaskLocalDir(allocdir.TaskSecretsContainerPath) + d.taskEnv.SetSecretsDir(allocdir.TaskSecretsContainerPath) config := &docker.Config{ Image: driverConfig.ImageName, diff --git a/client/driver/executor/executor_linux.go b/client/driver/executor/executor_linux.go index c673555cc..b43e53262 100644 --- a/client/driver/executor/executor_linux.go +++ b/client/driver/executor/executor_linux.go @@ -240,6 +240,7 @@ func (e *UniversalExecutor) configureChroot() error { e.ctx.TaskEnv. SetAllocDir(filepath.Join("/", allocdir.SharedAllocName)). SetTaskLocalDir(filepath.Join("/", allocdir.TaskLocal)). + SetSecretsDir(filepath.Join("/", allocdir.TaskSecrets)). Build() if e.cmd.SysProcAttr == nil {