From 9eb1a87c4720588d2c8f49f0784e2ad5aa014a60 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Wed, 5 Jul 2017 09:36:17 -0700 Subject: [PATCH 1/2] rkt: use %s instead of %q when interpolating env Fixes #2686 --- client/driver/rkt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/driver/rkt.go b/client/driver/rkt.go index 17c05711930..a21ef809bda 100644 --- a/client/driver/rkt.go +++ b/client/driver/rkt.go @@ -332,7 +332,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (*StartResponse, // Inject environment variables for k, v := range ctx.TaskEnv.Map() { - cmdArgs = append(cmdArgs, fmt.Sprintf("--set-env=%v=%q", k, v)) + cmdArgs = append(cmdArgs, fmt.Sprintf("--set-env=%s=%s", k, v)) } // Check if the user has overridden the exec command. From 80436f7e7c1d7fff8fa5cf432bdd49c76498cccd Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Wed, 5 Jul 2017 09:42:30 -0700 Subject: [PATCH 2/2] Add #2777 to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fcb90e0ba09..eca054be043 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ BUG FIXES: * client/config: Use `cpu_total_compute` whenever it is set [GH-2745] * driver/exec: Properly set file/dir ownership in chroots [GH-2552] * driver/docker: Fix panic in Docker driver on Windows [GH-2614] + * driver/rkt: Fix env var interpolation [GH-2777] * server: Reject non-TLS clients when TLS enabled [GH-2525] * server: Fix a panic in plan evaluation with partial failures and all_at_once set [GH-2544]