Commit Graph

178 Commits

Author SHA1 Message Date
Alex Dadgar
cce384e0f1 Remove old TODOs 2016-11-15 16:23:37 -08:00
Alex Dadgar
5d4e0f18bc 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
Alex Dadgar
87201fa510 Run environmental fingerprinters after host fingerprinters and do an override 2016-11-07 12:21:50 -08:00
Alex Dadgar
008d91aa56 Advertise signalling abilities 2016-10-19 15:06:23 -07:00
Alex Dadgar
9ff2bf0bff Fix Vault parsing of booleans 2016-10-10 18:04:39 -07:00
Alex Dadgar
ca906ac660 small fixes 2016-09-01 13:38:31 -07:00
Alex Dadgar
f9391f041c Fingerprint 2016-09-01 11:10:14 -07:00
Kenjiro Nakayama
5e4dbd0ff3 tiny: Fix duplicated error message in CPU fingerprint 2016-08-07 12:49:40 +09:00
Michal Wieczorek
f60d2aed58 Link speed for windows network fingerprinting - tests 2016-07-22 22:49:03 +02:00
Michal Wieczorek
59b0e627d0 Link speed for windows network fingerprinting 2016-07-20 22:13:50 +02:00
Sean Chittenden
dd7c28165b Alpha-sort the build platforms 2016-07-11 12:23:46 -07:00
Sean Chittenden
fc8110ba96 Merge branch 'master' into f-resource-isolation-fingerprinter 2016-07-11 12:23:09 -07:00
Sean Chittenden
bb8b47d478 Remove cgroup fingerprinter from non-linux systems.
If someone wants to extend or reuse Cgroup detenction in the future they
can move `cgroup_linux.go` to `cgroup.go` and add the relevant build
tags.

Requested by: @dadgar
2016-07-11 12:16:56 -07:00
Alex Dadgar
3a98201f50 Get windows to build 2016-07-11 11:52:41 -06:00
Sean Chittenden
3d207247ad Merge branch 'f-resource-isolation-cleanup' into f-resource-isolation-fingerprinter 2016-07-11 00:10:21 -07:00
Sean Chittenden
c26bdebc28 Improve readability: use of a switch vs two if's 2016-07-10 20:18:57 -07:00
Sean Chittenden
226df7dea9 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
Sean Chittenden
44487cc7f1 Build the Cgroup fingerprinter on only Linux.
Change the logic from `!linux` to an empty build tag so that *if*
another platform picks up Cgroups support they can add themselves to the
necessary build tags for this fingerprinter and be on their way.
Because this technology isn't inherently Linux-specific and isn't
mutually exclusive of other resource isolation containers, resist the
urge to rename the Cgroup fingerprinter to something generic like the
ResourceContainerFingerprinter.
2016-07-10 13:55:06 -07:00
Sean Chittenden
7524c13a16 Centralize the fingerprintrs.
Add platform specific fingerprinters per platform.

Requested by: @diptanu
2016-07-09 22:31:14 -07:00
Sean Chittenden
962cf7b07d Initialize the list of available fingerprinters per platform. 2016-07-09 00:22:42 -07:00
Sean Chittenden
762973e15f Consolidate fingerprinters into a single map. 2016-07-08 23:37:14 -07:00
Jake Champlin
b5b7b7d16e Update failing tests 2016-06-23 11:28:17 -04:00
Alex Dadgar
f2e28735a5 Treat float as int 2016-06-22 15:09:39 -07:00
Alex Dadgar
d87d988491 Floor CPU MHz and total compute and mark hostname as unique 2016-06-22 15:01:36 -07:00
Sean Chittenden
e26606acfd Memoize the CPU stats. Error if CPU fingerprinting fails. 2016-06-17 12:13:53 -07:00
Sean Chittenden
e42f7d5c23 Record and use only the first Mhz from the CPU fingerprinter.
Assume all cores are the same speed.
2016-06-17 11:06:57 -07:00
Sean Chittenden
b0490efb38 In the debug log, split the unit from the measurement
awk(1) friendly is UNIX(tm) friendly.
2016-06-16 23:07:13 -07:00
Sean Chittenden
e0b4f7a080 Warn when we're unable to fingerprint the CPU Mhz 2016-06-16 23:07:13 -07:00
Sean Chittenden
a6dc002415 Explicitly call cpu.Counts() to determine the CPU core count
Much safer than counting the number of InfoStat structs returned.
2016-06-16 23:07:13 -07:00
Sean Chittenden
8e1777ae3a Test for errors 2016-06-16 14:43:46 -07:00
Sean Chittenden
329057e22b Only actively test Consul when env CONSUL_HTTP_ADDR is set 2016-06-10 15:50:11 -04:00
Sean Chittenden
6785e7632c Provide a default ConsulConfig for client/config.DefaultConfig()
Change the unit test to only test if the consul link exists, not the
value of the link.  The old test was hostname specific and therefore
would always be different based on the environment running the tests.
2016-06-10 15:50:11 -04:00
Sean Chittenden
ab99e89bd9 Reconcile, clean up, and centralize API version numbers (major and minor).
Reduce future confusion by introducing a minor version that is gossiped out
via the `mvn` Serf tag (Minor Version Number, `vsn` is already being used for
to communicate `Major Version Number`).

Background: hashicorp/consul/issues/1346#issuecomment-151663152
2016-06-10 15:50:11 -04:00
Sean Chittenden
e6397da738 Centralize the creation of a consul/api.Config struct.
While documented, the consul.timeout parameter wasn't ever set
except one-off in the Consul fingerprinter.
2016-06-10 15:50:11 -04:00
Diptanu Choudhury
445b181fec Updated gopsutil 2016-05-28 19:42:34 -07:00
Sean Chittenden
29be52f762 Speling police 2016-05-15 09:41:34 -07:00
Sean Chittenden
a91f41ce14 Establish a floor of one core for the number of cores.
In most cases the upstream library [shirou/gopsutil](https://github.com/shirou/gopsutil)
needs to be fixed.
2016-05-09 12:22:40 -07:00
Sean Chittenden
fd9bcabaa8 Emit various debugging information with the results of the fingerprinter 2016-05-09 12:21:51 -07:00
Sean Chittenden
32ade79a62 cgroups are a decidedly Linux-only feature. Build and test as such. 2016-05-09 11:56:35 -07:00
Sean Chittenden
be7cdf97d1 Decrease the log-level from WARN to DEBUG when fingerprinting GCE
This brings the logging here inline with the remaining fingerprinting code
2016-05-09 11:56:35 -07:00
Sean Chittenden
1d108a77d6 Rename cgroup_universal.go to cgroup_default.go
Universal implies it is applicable to Linux, whereas default implies
the fallthrough for the non-Linux build targets.
2016-05-09 11:56:35 -07:00
Sean Chittenden
e5272cea2b Move network detection code to Linux-specific build
Non-Linux build targets get the current default of 0.  This will allow
platform specific fingerprinting for network capabilities.
2016-05-09 11:56:35 -07:00
Sean Chittenden
0fdb16af99 Stub out FreeBSD support for Nomad
Compiles, but is not functional (yet).
2016-05-09 11:56:35 -07:00
Troy Swanson
5379642cbb Make logging more consistent 2016-04-15 15:42:57 -05:00
Alex Dadgar
b818379576 add nomad fingerprinter 2016-03-22 17:12:30 -07:00
Alex Dadgar
df22fcad3d Merge pull request #712 from iverberk/f-cgroup-finterprinter
Add periodic cgroup fingerprinter
2016-01-29 08:50:43 -08:00
Ivo Verberk
0289252ce7 Add comments and small improvements to cgroup fingerprinter 2016-01-29 14:34:29 +01:00
Ivo Verberk
5266f6d947 Fix comment 2016-01-27 10:56:35 +01:00
Ivo Verberk
d8480ac75b Add a periodic cgroup fingerprinter 2016-01-27 07:22:25 +01:00
Alex Dadgar
bbc4beeef6 Respond to comments 2016-01-26 14:55:38 -08:00