Commit Graph

111 Commits

Author SHA1 Message Date
Chris Bednarski 2719c4ffd7 Merge branch 'master' into f-windows-networking 2015-11-06 13:32:28 -08:00
Alex Dadgar 5f1b6e70b0 Client handles periodic fingerprinters 2015-11-05 13:46:17 -08:00
Alex Dadgar 5f84878ffb Add consul fingerprinter to builtin list; sort list; fix bad error in consul fingerprinter 2015-11-05 13:46:16 -08:00
Alex Dadgar f9fd83c696 Merge fix 2015-11-05 13:46:02 -08:00
Kenjiro Nakayama 21f537339e Use const value for AWS metadata URL 2015-11-04 00:06:14 +09:00
Chris Bednarski a67a78a2d9 Use the same network fingerprinter for *nix and windows 2015-10-30 16:48:02 -07:00
Diptanu Choudhury e55bbe5f2c Refactored code 2015-10-29 16:16:10 -07:00
Diptanu Choudhury 17d430e46c Renamed BasicNetworkInterfaceDetector to DefaultNetworkInterfaceDetector 2015-10-29 15:55:49 -07:00
Diptanu Choudhury 1360f8c6fa Fixed a debug message 2015-10-29 15:17:40 -07:00
Diptanu Choudhury d31f567484 Fixed style of a debug log 2015-10-29 15:15:44 -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 b048919b63 Added some coments 2015-10-29 11:05:58 -07:00
Diptanu Choudhury 6400273cf8 Added tests for testing detecting default device 2015-10-29 11:01:15 -07:00
Diptanu Choudhury b78c00f255 Introduced an interface to detect network devices so that we can mock it for tests 2015-10-28 15:58:40 -07:00
Diptanu Choudhury f0e445d8f5 Refactored the findInterfaces method to make it more clear 2015-10-28 15:48:08 -07:00
Diptanu Choudhury a3d79ec589 Some coding style changes 2015-10-28 15:03:11 -07:00
Diptanu Choudhury 9b86b2313f We don't want lo and PPP in production 2015-10-28 14:44:46 -07:00
Diptanu Choudhury df5efd1e24 Added more information to log 2015-10-28 14:41:13 -07:00
Diptanu Choudhury 58bf6047a7 Adding more information to errors 2015-10-28 14:32:13 -07:00
Diptanu Choudhury 2464789b73 Added more comments 2015-10-28 14:03:33 -07:00
Diptanu Choudhury 915be5e86c Selecting the ipv4 address if there are ipv4 and ipv6 addresses configured for an interface 2015-10-28 13:38:28 -07:00
Diptanu Choudhury fffb0ed5ae Exctracted a method to detect network interface 2015-10-28 11:11:13 -07:00
Diptanu Choudhury 7a15cf0e45 Fix merge conflicts 2015-10-28 08:54:29 -07:00
Kenjiro Nakayama a79ae3c546 Assign IP when network device is specified 2015-10-28 21:19:06 +09:00
Diptanu Choudhury 809f360743 Using the Go stdlib APIs to detect IP Address of a device 2015-10-27 14:14:25 -07:00
Kenjiro Nakayama e688dc3826 Set default network interface rather than eth0 for non-dev mode, and use loopback device for dev mode by default 2015-10-28 02:03:48 +09:00
Kenjiro Nakayama fa005d75fa Set default network interface rather than eth0 2015-10-25 23:32:54 +09:00
Jeff Mitchell 959c175ca1 Update the location of cleanhttp 2015-10-22 14:21:07 -04:00
Jeff Mitchell cea5fd9081 Use cleanhttp for truly clean clients and transports. 2015-10-22 10:58:23 -04:00
Alex Dadgar 1d15f6eda6 Bind alloc dir and task local dir to docker containers and parse args correctly 2015-10-15 16:40:07 -07:00
Abhishek Chanda 953bd8b53f Trim extra newline from kernel version 2015-10-15 00:54:21 -07:00
Alex Dadgar 76ec48bfce Merge pull request #215 from Carevoyance/gce_fingerprint
Add GCE fingerprinting functionality
2015-10-12 16:14:32 -07:00
Daniel Imfeld c9c8dee48e More syntax cleanup 2015-10-12 17:57:45 -05:00
Daniel Imfeld 9730df8411 Fix old comments and other syntax cleanup 2015-10-12 16:56:33 -05:00
Daniel Imfeld 9f58d85762 GCE fingerprinter no longer updates network resources
It has nothing to add that the generic fingerprinters aren't
finding on their own already.
2015-10-09 18:34:57 -05:00
Daniel Imfeld cbe349b8b4 Add a few more GCE-specific attributes:
* cpu-platform
* scheduling.automatic-restart
* scheduling.on-host-maintenance
* network.NETWORKNAME=true
2015-10-09 09:10:40 -05:00
Alex Dadgar 8130510a5a Fix AWS Networking Fingerprint tests failing when actually on AWS 2015-10-08 12:49:43 -07:00
Daniel Imfeld d66e78c5ca Parse information for all GCE network interface.
* No longer setting Device name in the network interface since we can't
match up the info here with real device names.
* Add attributes for all external IPs if more than one exists.
2015-10-07 13:35:20 -05:00
Daniel Imfeld 70350aead9 Compact tags and attribute reading code. 2015-10-07 12:39:23 -05:00
Ivo Verberk c6e1b13b51 Fix vet warnings 2015-10-07 12:26:58 +02:00
Daniel Imfeld dc1c8e5273 TestNetworkFingerprint_notAWS passes even when actually on AWS 2015-10-06 21:21:42 -05:00
Daniel Imfeld 892cad6775 NonXXX tests should pass when actually running in their respective environments.
Fixes #224
2015-10-06 21:16:28 -05:00
Daniel Imfeld 32d5c61779 Consolidate GCEMetadataClient into EnvGCEFingerprint
This allows easier reuse of the same client across multiple functions.
2015-10-05 13:13:25 -05:00
Daniel Imfeld a85dda68fe And add a comment to the constant. 2015-10-05 12:59:02 -05:00
Daniel Imfeld adbb23e267 Use a constant for the default GCE metadata URL 2015-10-05 12:57:45 -05:00
Daniel Imfeld 46bbfc3549 isAWS should return false on GCE
GCE and AWS both expose metadata servers, and GCE's 404 response
includes the URL in the content, which maatches the regex. So,
check the response code as well and if a 4xx code comes back,
take that to meanit's not AWS.
2015-10-05 00:42:34 -05:00
Daniel Imfeld a43a262e66 Fingerprinting code for GCE nodes
This reads the following:

* hostname
* instance id
* machine-type
* zone
* internal IP
* external IP (if any)
* tags
* attributes

Atributes are placed under the platform.gce.attr.* hierarchy.

Tags are set up as platform.gce.tag.TagName=true.
2015-10-05 00:40:43 -05:00
Alex Dadgar e60e6ff8f5 Add debug line when setting link speed to default 2015-10-02 17:32:17 -07:00
Alex Dadgar 4cc8588cb5 Merges 2015-10-02 17:32:11 -07:00
Antoine POPINEAU f35ebe14ad Merge branch 'master' into dev/net-fingerprint 2015-10-02 09:38:35 +02:00