mirror of
https://github.com/kemko/nomad.git
synced 2026-01-04 17:35:43 +03:00
add detected to more drivers where the driver is found but unusable
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user