Skip to content

Commit

Permalink
fingerprint: avoid api query if config overrides it
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmood Ali committed Nov 26, 2019
1 parent 34b9ee5 commit f24dd5b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client/fingerprint/env_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ func (f *EnvAWSFingerprint) Fingerprint(request *FingerprintRequest, response *F
}

// find LinkSpeed from lookup
throughput := f.linkSpeed(ec2meta)
if cfg.NetworkSpeed != 0 {
throughput = cfg.NetworkSpeed
} else if throughput == 0 {
throughput := cfg.NetworkSpeed
if throughput == 0 {
throughput = f.linkSpeed(ec2meta)
}
if throughput == 0 {
// Failed to determine speed. Check if the network fingerprint got it
found := false
if request.Node.Resources != nil && len(request.Node.Resources.Networks) > 0 {
Expand Down

0 comments on commit f24dd5b

Please sign in to comment.