Added consul script check support for raw_exec driver

This commit is contained in:
capone212 2016-05-09 13:35:19 +03:00
parent d30eb22c5b
commit 875df91e0b

View file

@ -586,6 +586,20 @@ func (e *UniversalExecutor) createCheck(check *structs.ServiceCheck, checkID str
}, nil }, nil
} }
if check.Type == structs.ServiceCheckScript && e.ctx.Driver == "raw_exec" {
return &ExecScriptCheck{
id: checkID,
interval: check.Interval,
timeout: check.Timeout,
cmd: check.Command,
args: check.Args,
taskDir: e.taskDir,
FSIsolation: e.command.FSIsolation,
}, nil
}
return nil, fmt.Errorf("couldn't create check for %v", check.Name) return nil, fmt.Errorf("couldn't create check for %v", check.Name)
} }