diff --git a/client/driver/exec_linux.go b/client/driver/exec_linux.go index b88226ffb..138a92d75 100644 --- a/client/driver/exec_linux.go +++ b/client/driver/exec_linux.go @@ -13,6 +13,9 @@ const ( ) func (d *ExecDriver) Fingerprint(req *cstructs.FingerprintRequest, resp *cstructs.FingerprintResponse) error { + // The exec driver will be detected in every case + resp.Detected = true + // Only enable if cgroups are available and we are root if !cgroupsMounted(req.Node) { if d.fingerprintSuccess == nil || *d.fingerprintSuccess { @@ -35,6 +38,5 @@ func (d *ExecDriver) Fingerprint(req *cstructs.FingerprintRequest, resp *cstruct } resp.AddAttribute(execDriverAttr, "1") d.fingerprintSuccess = helper.BoolToPtr(true) - resp.Detected = true return nil } diff --git a/client/driver/java.go b/client/driver/java.go index 3e0a831ec..3c4b31958 100644 --- a/client/driver/java.go +++ b/client/driver/java.go @@ -119,6 +119,7 @@ func (d *JavaDriver) Fingerprint(req *cstructs.FingerprintRequest, resp *cstruct } d.fingerprintSuccess = helper.BoolToPtr(false) resp.RemoveAttribute(javaDriverAttr) + resp.Detected = true return nil }