Merge pull request #3909 from hashicorp/b-node-attributes-concurrent-access
Fingerprinters accessing node information should be thread safe
This commit is contained in:
commit
bd88877249
|
@ -100,7 +100,12 @@ func (fm *FingerprintManager) setupDrivers(drivers []string) error {
|
|||
func (fm *FingerprintManager) fingerprint(name string, f fingerprint.Fingerprint) (bool, error) {
|
||||
request := &cstructs.FingerprintRequest{Config: fm.getConfig(), Node: fm.node}
|
||||
var response cstructs.FingerprintResponse
|
||||
if err := f.Fingerprint(request, &response); err != nil {
|
||||
|
||||
fm.nodeLock.Lock()
|
||||
err := f.Fingerprint(request, &response)
|
||||
fm.nodeLock.Unlock()
|
||||
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue