agent/proxy: don't create the directory in newProxy

This commit is contained in:
Mitchell Hashimoto 2018-05-02 20:13:40 -07:00
parent 49bc7181a4
commit d019d33bc6
No known key found for this signature in database
GPG key ID: 744E147AA52F5B0A

View file

@ -335,13 +335,6 @@ func (m *Manager) newProxy(mp *local.ManagedProxy) (Proxy, error) {
return nil, fmt.Errorf("internal error: nil *local.ManagedProxy or Proxy field")
}
// Attempt to create the log directory now that we have a proxy
if m.LogDir != "" {
if err := os.MkdirAll(m.LogDir, 0700); err != nil {
m.Logger.Printf("[ERROR] agent/proxy: failed to create log directory: %s", err)
}
}
p := mp.Proxy
switch p.ExecMode {
case structs.ProxyExecModeDaemon: