From af85613a8e2dac6388c398cbf06202e182074b10 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Lendholt Date: Thu, 22 Sep 2016 08:39:36 +0200 Subject: [PATCH] Fixed a bug when giving in another logging driver than syslog. Before this commit, if the Logging config did not contain a logging option "syslog-address", it would definitely insert this option. If then, you decide to take another logdriver than syslog, docker would fail because it received a wrong log option for the selected driver. Now, nomad will only insert the syslog address in a hard way if there are no logging options at all - this way it keeps the default nomad settings. --- client/driver/docker.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/client/driver/docker.go b/client/driver/docker.go index 88116941f468..e000d5ccece4 100644 --- a/client/driver/docker.go +++ b/client/driver/docker.go @@ -438,9 +438,6 @@ func (d *DockerDriver) createContainer(ctx *ExecContext, task *structs.Task, d.logger.Printf("[DEBUG] driver.docker: Setting default logging options to syslog and %s", syslogAddr) if driverConfig.Logging[0].Type == "" { driverConfig.Logging[0].Type = "syslog" - } - - if driverConfig.Logging[0].Config["syslog-address"] == "" { driverConfig.Logging[0].Config["syslog-address"] = syslogAddr } }