From 6814c476b1bcebaedaa40ebdb52a396c33d9bdc6 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 15 Oct 2015 18:19:13 -0700 Subject: [PATCH] Rkt driver clears task environment variables --- client/driver/rkt.go | 5 +++++ website/source/docs/drivers/rkt.html.md | 3 ++- website/source/docs/jobspec/environment.html.md | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client/driver/rkt.go b/client/driver/rkt.go index 8bebbaf91..c907f5caf 100644 --- a/client/driver/rkt.go +++ b/client/driver/rkt.go @@ -114,6 +114,11 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e // Inject the environment variables. envVars := TaskEnvironmentVariables(ctx, task) + + // Clear the task directories as they are not currently supported. + envVars.ClearTaskLocalDir() + envVars.ClearAllocDir() + for k, v := range envVars.Map() { cmd_args = append(cmd_args, fmt.Sprintf("--set-env=%v=%v", k, v)) } diff --git a/website/source/docs/drivers/rkt.html.md b/website/source/docs/drivers/rkt.html.md index 924641d8b..d96a4b16f 100644 --- a/website/source/docs/drivers/rkt.html.md +++ b/website/source/docs/drivers/rkt.html.md @@ -30,7 +30,8 @@ hash, ACI address or docker registry. The `Rkt` driver does not currently support mounting the `alloc/` and `local/` directory. It is currently blocked by this [Rkt -issue](https://github.com/coreos/rkt/issues/761). +issue](https://github.com/coreos/rkt/issues/761). As such the coresponding +[environment variables](/docs/jobspec/environment.html#task_dir) are not set. ## Client Requirements diff --git a/website/source/docs/jobspec/environment.html.md b/website/source/docs/jobspec/environment.html.md index a80759843..fc9cc91a6 100644 --- a/website/source/docs/jobspec/environment.html.md +++ b/website/source/docs/jobspec/environment.html.md @@ -56,7 +56,7 @@ exported as environment variables for consistency, e.g. `NOMAD_PORT_5000`. Please see the relevant driver documentation for details. -### Task Directories +### Task Directories Nomad makes the following two directories available to tasks: