Commit Graph

219 Commits

Author SHA1 Message Date
Preetha Appan
30d104251b Code review feedback and unit test 2018-03-28 10:07:15 -05:00
Mildred Ki'Lya
d31105c69e Allow to specify total memory on agent configuration
Allow to set the total memory of an agent in its configuration file. This
can be used in case the automatic detection doesn't work or in specific
environments when memory overcommit (using swap for example) can be
desirable.
2018-03-27 15:46:18 -05:00
Chelsea Holland Komlo
1570972cb3 add concept of health checks to fingerprinters and nodes
fix up feedback from code review

add driver info for all drivers to node
2018-03-21 15:15:25 -04:00
Josh Soref
a851a79407 spelling: verify 2018-03-11 19:13:32 +00:00
Josh Soref
3124128554 spelling: mount 2018-03-11 18:27:18 +00:00
Josh Soref
fb7a5d6699 spelling: interface 2018-03-11 18:15:37 +00:00
Josh Soref
4efe049e4f spelling: added 2018-03-11 17:34:28 +00:00
Chelsea Holland Komlo
ba2ebbc7f9 code review fixup 2018-01-31 18:34:03 -05:00
Chelsea Holland Komlo
a9447addd3 add applicable boolean to fingerprint response
public fields and remove getter functions
2018-01-31 13:21:45 -05:00
Chelsea Holland Komlo
ae889b4fba remove attributes from periodic fingerprints when state changes
write test for client periodic fingerprinters
2018-01-29 13:48:54 -05:00
Chelsea Holland Komlo
f5fc20a564 create safe getters and setters for fingerprint response 2018-01-26 11:22:05 -05:00
Chelsea Holland Komlo
a76a404131 add test case for available cgroups 2018-01-25 06:08:07 -05:00
Chelsea Holland Komlo
5e8151d700 refactor Fingerprint to request/response construct 2018-01-24 11:54:02 -05:00
Charlie Voiselle
24c8d2c439 Merge pull request #3556 from angrycub/f-fingerprint-log-level
Dropped loglevel for AWS fingerprinter env read misses to DEBUG
2017-11-16 16:27:25 -05:00
Charlie Voiselle
83aa6251c1 Lowered to DEBUG from AD feedback 2017-11-16 14:13:03 -05:00
Alex Dadgar
00557afb81 Use interface attached to default route 2017-11-15 11:32:32 -08:00
Charlie Voiselle
3a88718b2e Dropped loglevel for AWS fingerprinter env reads
Certain environments use WARN for serious logging; however, it's very
possible to have machines without some of the fingerprinted keys
(public-ipv4 and public-hostname specifcally).  Setting log level to
INFO seems more consistent with this possibility.
2017-11-15 18:20:59 +00:00
Alex Dadgar
35cb143965 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
Michael Schurter
1b21130dae Don't panic on unexpeced Consul response
Fixes #3326
2017-10-11 18:25:54 -07:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Alex Dadgar
77c1ebd14f 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
Alex Dadgar
7b7ef952f5 Fix tests 2017-08-16 16:26:52 -07:00
Alex Dadgar
c26ecb7092 Add version package
This PR adds a version package and consolidates version strings into a
Version struct.
2017-08-16 15:44:21 -07:00
Charlie Voiselle
7dc43b0584 Updated AWS fingerprint test for ami-id
In https://github.com/hashicorp/nomad/pull/2999, I changed ami-id
to non-unique.  This updates the test to reflect that.
2017-08-11 12:54:27 -04:00
Charlie Voiselle
dbcf3ff516 AMI ID is potentally non-unique
Changed the keys map to reflect that.
2017-08-09 12:53:54 -04:00
Luke Farnell
7a56971508 fixed all spelling mistakes for goreport 2017-08-07 17:13:05 -04:00
Alex Dadgar
8c9234e319 Make test Vault pick random ports 2017-07-25 17:40:59 -07:00
Alex Dadgar
700147c90e Speed up client startup 2017-07-20 22:34:24 -07:00
Michael Schurter
ca38020521 0 compute == error 2017-07-03 14:51:02 -07:00
Michael Schurter
c10f530964 Fix cpu_total_compute override 2017-07-03 14:51:02 -07:00
Diptanu Choudhury
b0a20b4dc9 Fixed typo 2017-04-10 11:45:11 -07:00
Diptanu Choudhury
536fdde121 Added a test 2017-04-08 13:44:21 -07:00
Diptanu Choudhury
bee4b57368 Removed redundant code 2017-04-07 18:28:22 -07:00
Diptanu Choudhury
ad00ec861b Ignoring link local addresses 2017-04-07 16:04:36 -07:00
Diptanu Choudhury
94f9542a04 Finding the appropriate cidr block 2017-04-06 16:04:59 -07:00
Diptanu Choudhury
8b93d40298 Making the fingerprinter support ipv6 ips 2017-04-06 01:06:32 -07:00
Alex Dadgar
bfebe1afdc rename cpu_total_compute and docs 2017-03-14 14:15:49 -07:00
Alex Dadgar
36dc330737 Various fixes
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Dave Walker (Daviey)
5d484dcb96 Enable kernel.version on Windows
Previously, this value was guarded against running on Windows
because it called the `uname` command which is unlikely to
be there.

This change now sets the value from gopsutil, which might
well be an empty string.

Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2017-03-01 18:48:23 +00:00
Dave Walker (Daviey)
5875bc1066 Don't exec uname for node attribute kernel.version
Previously with client fingerprinting, sys/exec's Command
function was being used to execute `uname -r` and the return
string processed into the kernel.version node attribute.

This change uses gopsutil/host KernelVersion function
instead.  This means we can drop the os/exec, strings and
fmt imports... and not execute an external binary.

Signed-off-by: Dave Walker (Daviey) <email@daviey.com>
2017-03-01 09:45:56 +00:00
Diptanu Choudhury
863120cc1a Fixed namespacing for the cpu arch 2017-01-06 14:23:22 -08:00
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