mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
Move where attribute for driver detection is set
This commit is contained in:
@@ -1053,6 +1053,16 @@ func (c *Client) updateNodeFromDriver(name string, fingerprint, health *structs.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// COMPAT Remove in Nomad 0.10
|
||||
// We maintain the driver enabled attribute until all drivers expose
|
||||
// their attributes as DriverInfo
|
||||
driverName := fmt.Sprintf("driver.%s", name)
|
||||
if fingerprint.Detected {
|
||||
c.config.Node.Attributes[driverName] = "1"
|
||||
} else {
|
||||
delete(c.config.Node.Attributes, driverName)
|
||||
}
|
||||
}
|
||||
|
||||
if health != nil {
|
||||
|
||||
@@ -345,10 +345,6 @@ func (fm *FingerprintManager) fingerprintDriver(name string, f fingerprint.Finge
|
||||
return false, err
|
||||
}
|
||||
|
||||
if node := fm.updateNodeAttributes(&response); node != nil {
|
||||
fm.setNode(node)
|
||||
}
|
||||
|
||||
// Remove the health check attribute indicating the status of the driver,
|
||||
// as the overall driver info object should indicate this.
|
||||
delete(response.Attributes, fmt.Sprintf("driver.%s", name))
|
||||
|
||||
Reference in New Issue
Block a user