Commit Graph

29 Commits

Author SHA1 Message Date
Danielle Tomlinson 66c521ca17 client: Move fingerprint structs to pkg
This removes a cyclical dependency when importing client/structs from
dependencies of the plugin_loader, specifically, drivers. Due to
client/config also depending on the plugin_loader.

It also better reflects the ownership of fingerprint structs, as they
are fairly internal to the fingerprint manager.
2018-12-01 17:10:39 +01:00
Alex Dadgar 8504505c0d client uses passed logger and fix fingerprinters 2018-10-16 16:53:30 -07:00
Alex Dadgar 300b1a7a15 Tests only use testlog package logger 2018-06-13 15:40:56 -07:00
Josh Soref 75d1240446 spelling: interface 2018-03-11 18:15:37 +00:00
Chelsea Holland Komlo b8e8064835 code review fixup 2018-01-31 18:34:03 -05:00
Chelsea Holland Komlo 7b53474a6e add applicable boolean to fingerprint response
public fields and remove getter functions
2018-01-31 13:21:45 -05:00
Chelsea Holland Komlo 7c19de797c create safe getters and setters for fingerprint response 2018-01-26 11:22:05 -05:00
Chelsea Holland Komlo 9a8344333b refactor Fingerprint to request/response construct 2018-01-24 11:54:02 -05:00
Alex Dadgar 97ec3974a9 Use interface attached to default route 2017-11-15 11:32:32 -08:00
Alex Dadgar ee31e15f51 Better interface selection heuristic
This PR introduces a better interface selection heuristic such that we
select interfaces with globally routable unicast addresses over link
local addresses.

Fixes https://github.com/hashicorp/nomad/issues/3487
2017-11-13 15:13:43 -08:00
Alex Dadgar fd7d614ae4 Handle interfaces that only have link-local addrs
This PR changes the fingerprint handling of network interfaces that only
contain link local addresses. The new behavior is to prefer globally
routable addresses and if none are detected, to fall back to link local
addresses if the operator hasn't disallowed it. This gives us pre 0.6
behavior for interfaces with only link local addresses but 0.6+ behavior
for IPv6 interfaces that will always have a link-local address.

Fixes https://github.com/hashicorp/nomad/issues/3005

/cc diptanuc
2017-08-23 15:32:22 -07:00
Luke Farnell f0ced87b95 fixed all spelling mistakes for goreport 2017-08-07 17:13:05 -04:00
Diptanu Choudhury 45ad1298e6 Added a test 2017-04-08 13:44:21 -07:00
Alex Dadgar 9497991590 Updated AWS speeds and network_speed now overrides
This PR:

* Makes AWS network speeds more granular
* Makes `network_speed` an override and not a default
* Adds a default of 1000 MBits if no network link speed is detected.

Fixes #1985
2016-11-15 13:55:51 -08:00
Sean Chittenden 2ffbeee06c
Skip the network fingerprinter test when offline.
Conditionalize the network fingerprinter test so that it works when a
user is offline.  Similarly, when the network fingerprint test fails in
the future pass a HINT to the user to set an env var to allow the test
to be skipped in the future.
2016-07-10 20:16:06 -07:00
Alex Dadgar d5c77cd4a4 Update client fingerprinters 2016-01-26 10:08:01 -08:00
Alex Dadgar a352c0fc69 Fix network fingerprint test 2015-11-19 09:22:32 -08:00
Diptanu Choudhury e55bbe5f2c Refactored code 2015-10-29 16:16:10 -07:00
Diptanu Choudhury 08302d43ee Added a test to ensure we are not selecting devices which are not marked as UP or loopback and have no IP addresses 2015-10-29 15:14:13 -07:00
Diptanu Choudhury 6400273cf8 Added tests for testing detecting default device 2015-10-29 11:01:15 -07:00
Alex Dadgar 4cc8588cb5 Merges 2015-10-02 17:32:11 -07:00
Clint Shryock 8c0542a9af Refactor network fingerprinting to be generic, use build flags 2015-09-23 10:12:56 -05:00
Clint Shryock f876ed6673 refactoring, docs 2015-09-22 23:51:56 -05:00
Clint Shryock f60bbbfd15 populate node network resource 2015-09-22 23:22:23 -05:00
Clint Shryock e3c8ca8462 Update code for parsing IP address 2015-09-22 22:56:31 -05:00
Clint Shryock 5c749e1ffb Consolidate the AWS fingerprinters 2015-09-22 16:56:04 -05:00
Clint Shryock 2bbf080666 Refactor some AWS things, removing fingerprint/network.go
- move isAWS to env, use in other places
- fingerprint/network.go is no empty; removed
2015-09-22 16:31:57 -05:00
Clint Shryock a9cf7381ca Refactor the Network Fingerprinters 2015-09-22 15:59:00 -05:00
Clint Shryock d11bd582f7 Basic network fingerprinting for Unix type, AWS systems 2015-09-22 11:44:53 -05:00