Commit Graph

593 Commits

Author SHA1 Message Date
Michael Schurter c735589f41 Choose safer default advertise address
* -dev mode defaults bind & advertise to localhost
* Normal mode defaults bind to 0.0.0.0 & advertise to the resolved
  hostname. If the hostname resolves to localhost it will refuse to
  start and advertise must be manually set.
2016-11-08 11:17:16 -08:00
Diptanu Choudhury a1b4b20eff Changing the API to use the new servermember datastructure 2016-11-06 10:30:43 -08:00
Diptanu Choudhury 9e0507e878 Add an RPC endpoint for server members 2016-11-06 10:16:12 -08:00
Diptanu Choudhury 15f085a4d7 Merge pull request #1931 from hashicorp/rename-vault-config
Rename vault config
2016-11-06 10:14:25 -08:00
Diptanu Choudhury 98bd0e2100 Disable http checks if TLS is enabled 2016-11-03 17:33:58 -07:00
Diptanu Choudhury b6f9df5415 Renaming TLS related vault config 2016-11-03 14:24:39 -07:00
Seth Vargo 4a1fa67f26
Separate agent configuration into its own pages
I apologize in advance for the rather long PR, but unfortunately there
is not an easy way to break this up into smaller chunks. This separates
the agent configuration into smaller, more consumable pieces just like
the job specification.
2016-11-02 18:30:00 -04:00
Diptanu Choudhury 808718523b Merge pull request #1909 from hashicorp/region-wrapper
Making Nomad TLS configs region aware
2016-11-01 14:31:39 -07:00
Michael Schurter 536c2921e9 Remove ServerName because we verify based on region 2016-11-01 14:17:31 -07:00
Alex Dadgar ebe4b7893b Merge branch 'master' of github.com:hashicorp/nomad 2016-11-01 13:24:07 -07:00
Alex Dadgar 75696f4c70 Resolve 2016-11-01 13:23:44 -07:00
Alex Dadgar 1156c79e1b Read from env 2016-11-01 12:37:27 -07:00
Alex Dadgar d037c4ffe9 Check that advertise without ports works in test 2016-10-31 18:08:49 -07:00
Alex Dadgar 376651bcb2 Allow advertise to not specify port 2016-10-31 17:12:29 -07:00
Alex Dadgar c4d8d744c7 Add to valid configs fields 2016-10-27 11:29:12 -07:00
Alex Dadgar ddf5fb82b5 Small cleanups 2016-10-27 10:51:11 -07:00
Evan Gilman 59489e4e4f Never return 0.0.0.0 as a non-bind address 2016-10-27 10:51:11 -07:00
Evan Gilman 7511490c12 Add more address selector tests 2016-10-27 10:51:11 -07:00
Evan Gilman af3de22d4f Remove old address advertise config code 2016-10-27 10:51:11 -07:00
Evan Gilman de33949df8 Add address selector methods to the agent 2016-10-27 10:51:11 -07:00
Evan Gilman 06909d2465 Use bind address for consul healtchecks in nomad client too 2016-10-27 10:47:45 -07:00
Evan Gilman c0ff732513 Use bind address for consul service checks 2016-10-27 10:47:45 -07:00
Diptanu Choudhury a051d87c5d Making the nomad agent checks tcp 2016-10-26 16:30:29 -07:00
Diptanu Choudhury 84722234b4 Fixed a bunch of TLS related failures 2016-10-26 14:08:46 -07:00
Diptanu Choudhury df53a3bb92 Added datadog_address to valid keys 2016-10-26 13:28:28 -07:00
Diptanu Choudhury 067fcda3fe Making the cli use TLS if the client has enabled TLS 2016-10-26 11:13:53 -07:00
Diptanu Choudhury 50ca5e1e9d Merge pull request #1853 from hashicorp/f-rpc-http-tls
TLS support for http and RPC
2016-10-25 16:14:43 -07:00
Diptanu Choudhury 7c61e115bd Moved tlsutil into helpers 2016-10-25 16:05:37 -07:00
Diptanu Choudhury cf35aeac84 Moving the TLSConfig to structs 2016-10-25 15:57:38 -07:00
Diptanu Choudhury eefc8db3b3 Enabling TLS on cli 2016-10-25 10:39:17 -07:00
Alex Dadgar 1abc708c1d Vault flags 2016-10-24 17:23:48 -07:00
Diptanu Choudhury eb813a660f Updated the spec definition for tls config 2016-10-24 15:36:26 -07:00
Diptanu Choudhury e03927bb5c Changed the way TLS config is parsed 2016-10-24 13:56:19 -07:00
Alex Dadgar 692a809919 Merge pull request #1842 from hashicorp/f-version-and-id
Print the version and client node ID
2016-10-24 10:13:33 -07:00
Diptanu Choudhury 2e3118e69c Implemented TLS support for http and rpc 2016-10-23 22:22:00 -07:00
Michael Schurter 285e80ac0f Remove disk usage enforcement
Many thanks to @iverberk for the original PR (#1609), but we ended up
not wanting to ship this implementation with 0.5.

We'll come back to it after 0.5 and hopefully find a way to leverage
filesystem accounting and quotas, so we can skip the expensive polling.
2016-10-21 13:55:51 -07:00
Alex Dadgar aa0d8d0d8d Print the version and client node ID 2016-10-20 17:46:04 -07:00
Alex Dadgar 703b8423a3 Merge pull request #1816 from jippi/add-datadog-telemetry
Add datadog telemetry
2016-10-18 09:53:37 -07:00
Diptanu Choudhury 0f6e0d10b6 Enable serf encryption (#1791)
* Added the keygen command

* Added support for gossip encryption

* Changed the URL for keyring management

* Fixed the cli

* Added some tests

* Added tests for keyring operations

* Added a test for removal of keys

* Added some docs

* Fixed some docs

* Added general options
2016-10-17 10:48:04 -07:00
Christian Winther 3e953d725a initial work on datadog telemetry 2016-10-15 10:49:33 +02:00
Alex Dadgar db4e676d73 Merge pull request #1803 from hashicorp/b-vault-parse
Fix Vault Config parsing of booleans
2016-10-11 13:47:46 -07:00
Alex Dadgar 751aa114bf Fix Vault parsing of booleans 2016-10-10 18:04:39 -07:00
Alex Dadgar d0731a466f Skip SIGPIPE 2016-10-10 15:12:56 -07:00
Michael Schurter d8f8048d85 Merge pull request #1767 from hashicorp/f-docker-volumes-logging
Support Docker Volumes and Logging
2016-10-07 12:10:59 -07:00
Michael Schurter 44219cc083 Put docker volume support behind conf flag
Also add tests and fix bug with logging driver configuration.
2016-10-03 15:02:50 -07:00
Alex Dadgar d2837dec44 Do not allow path to escape the alloc dir for the FS commands 2016-10-03 14:58:44 -07:00
Michael Schurter 80085ddda5 Merge pull request #1735 from hashicorp/b-bootstrap-flapping
Retry all servers on RPC call failure
2016-09-27 16:33:15 -07:00
Michael Schurter a45921c402 Fix agent server set test
Test asserted endpoint appendend servers, but the new/desired behavior
is for the endpoint to set/overwrite servers.
2016-09-26 11:57:06 -07:00
Michael Schurter 2ab5264595 Retry all servers on RPC call failure
rpcproxy is refactored into serverlist which prioritizes good servers
over servers in a remote DC or who have had a failure.

Registration, heartbeating, and alloc status updating will retry faster
when new servers are discovered.

Consul discovery will be retried more quickly when no servers are
available (eg on startup or an outage).
2016-09-23 11:44:48 -07:00
Diptanu Choudhury 589356fd55 Adding a snapshot endpoint on the client (#1730) 2016-09-21 21:28:12 -07:00
Robert Neumayer e57d20d825 Fix typo
Telementry -> Telemetry
2016-09-11 09:46:05 +02:00
Diptanu Choudhury 7367d6adb4 Removing warn msg 2016-09-04 17:22:49 -07:00
Alex Dadgar 1ce5457ac0 Vault config flags 2016-09-01 15:41:07 -07:00
Michael Schurter cbb0b8e31e Merge pull request #1668 from hashicorp/b-fix-consul-updates
Fix old services not getting removed from consul on update
2016-08-31 17:17:09 -07:00
Michael Schurter ec96e03563 Query consul without helpers in test to be safe 2016-08-31 14:14:17 -07:00
Diptanu Choudhury c2945c3e0d Merge pull request #1670 from hashicorp/b-telemetry-config
Merging telemetry configs
2016-08-31 11:47:50 -07:00
Diptanu Choudhury 03783d2554 Added a test 2016-08-31 11:46:51 -07:00
Diptanu Choudhury a80f67d097 Merging telemetry configs 2016-08-31 11:24:01 -07:00
Michael Schurter aa8cbe777a Make comment more precise 2016-08-31 10:43:55 -07:00
Michael Schurter 7f6b5f4d2a Fix error message when querying consul fails 2016-08-31 10:42:51 -07:00
Michael Schurter db1cf6385e Assert syncer state is consistent with consul's state 2016-08-31 09:19:54 -07:00
Michael Schurter f6bf81270d Remove extra consul service tracking entirely
Instead just remove all associated services on shutdown.
2016-08-30 17:10:15 -07:00
Michael Schurter 27912a95d6 Fix old services not getting removed from consul on update
Fixes #1661
2016-08-30 16:36:42 -07:00
Alex Dadgar 4e8576516f Increase the timeout to be greater than the RPC hold threshold 2016-08-26 11:13:20 -07:00
Diptanu Choudhury b80147d183 Merge pull request #1645 from capone212/failing_cehcks_fix
issue #1636:  start CheckRunner if check exists in consul already
2016-08-24 16:27:05 -05:00
capone ce4d236a40 Fixed CR defects 2016-08-24 01:33:44 +03:00
Alex Dadgar 1da8566322 Merge pull request #1580 from hashicorp/f-disk-usage-monitoring
Monitor and enforce shared allocation directory disk usage
2016-08-23 09:49:53 -07:00
capone 10cc50ad29 First attemt to fix issue #1636 2016-08-23 19:09:20 +03:00
Alex Dadgar 4bfdd40948 test fixes 2016-08-18 10:30:47 -07:00
Ivo Verberk 2a17895a83 Disk resource monitoring and enforcement 2016-08-18 07:59:03 +02:00
Alex Dadgar 4135b4ece7 Address field name feedback 2016-08-17 16:23:29 -07:00
Alex Dadgar 7d899b6c60 Pass Vault config to client 2016-08-17 16:23:29 -07:00
Alex Dadgar eac2675faf Add enabled field 2016-08-17 16:23:29 -07:00
Alex Dadgar c913e4396f Add Vault config to server 2016-08-17 16:23:29 -07:00
Alex Dadgar 0ca4a9fa4f Change token/role names 2016-08-17 16:23:29 -07:00
Alex Dadgar adb3ce847f change config variable names to match vault 2016-08-17 16:23:29 -07:00
Alex Dadgar 93b5fab63b Parse Vault Config 2016-08-17 16:23:29 -07:00
Diptanu Choudhury 578171e7cb Merge pull request #1601 from hashicorp/b-fix-node-alloc-test
get a free port from the kernel
2016-08-16 17:09:03 -07:00
Diptanu Choudhury ce8a43b848 Fixed a test 2016-08-16 16:36:15 -07:00
Diptanu Choudhury f72ad34540 get a free port from the kernel 2016-08-16 16:05:37 -07:00
Diptanu Choudhury 4683aa3dc6 Cleaning up some code 2016-08-16 15:22:26 -07:00
Marin 69bc3a8fc8 Add support for initial check status 2016-08-16 12:05:15 -07:00
Alex Dadgar dd6c08a827 Merge pull request #1584 from novilabs/stream-framer-order
duplicate check for deep equals of frame order
2016-08-15 10:30:42 -07:00
Cameron Davison 0104d6fe08
use last job eval if multiple exist, when looking for registration 2016-08-13 22:37:35 -05:00
Cameron Davison 92ac9bb84c
duplicate check for deep equals of frame order 2016-08-13 22:26:53 -05:00
Diptanu Choudhury eff622036e Merge pull request #1562 from dbresson/support-query-strings-in-checks
support query strings in checks
2016-08-12 13:06:02 -07:00
Alex Dadgar ed23dff23c Merge pull request #1571 from hashicorp/t-logs-tests
Fixing logs tests on travis
2016-08-11 19:24:46 -07:00
Alex Dadgar 768055b4cc lock heartbeat 2016-08-11 18:37:08 -07:00
Alex Dadgar 4c77d9688f up timeouts 2016-08-11 18:30:46 -07:00
Alex Dadgar 2d5fa80ce7 Add travis multiplier 2016-08-11 18:16:10 -07:00
David Bresson 7d0fb58f03 Add a test for query string support 2016-08-11 12:22:46 -07:00
David Bresson c651cbbfd6 Add error handling to check registration 2016-08-11 11:49:48 -07:00
David Bresson f47a543a4d Add support for query strings in check paths 2016-08-11 11:27:29 -07:00
Mathias Lafeldt 4143a9059a
Fix reload of retry_join server addresses on SIGHUP
The current code does not update the actual config, but only the local
reference to it.
2016-08-11 16:03:21 +02:00
Kenjiro Nakayama c3b871e90d Return error when client failed to collect host stats 2016-08-11 09:38:28 +09:00
Diptanu Choudhury 9a75052d2c Merge pull request #1518 from pubnub/feature/chroot-map-rebase
Add config field to specify chroot mapping for exec driver
2016-08-10 17:00:03 -07:00
Alex Dadgar c203885352 consul syncer uses multi-error 2016-08-09 12:24:50 -07:00
Jay Oster dcb34412da Fix ConfigMerge test with chroot config 2016-08-08 18:59:18 -07:00
Jay Oster 2ae059b41d Address review comments
- Simplify map length check in Linux Executor
- Added a `chroot_env` test for config parser
- Moved `ChrootEnv` field from ExecutorCommand to ExecutorContext
- Added a test for `chroot_env` functionality
2016-08-04 15:33:06 -07:00
Diptanu Choudhury 5ff750db96 Merge pull request #1501 from hashicorp/f-stats-opt-in
Allow operators to opt into publishing node and alloc metrics
2016-08-04 13:33:56 -07:00
Diptanu Choudhury 88d383c47f Updated tests and comments 2016-08-04 11:29:36 -07:00
Jay Oster 7df692226a Add config field to specify chroot mapping for exec driver
- Same format as used by the internal chroot mapping
- Map: source_path -> dest_path
- Example HCL:

client {
  chroot_env {
    "/etc" = "/etc"
    "/lib" = "/lib"
    "/opt/projects/foo/bin" = "/usr/bin"
  }
}
2016-08-03 17:17:17 -07:00
Diptanu Choudhury 74caed0c7a Added an endpoint for users to reconcile job summaries 2016-08-03 16:12:47 -07:00
Diptanu Choudhury 41b540fbc8 Allow operators to opt into publishing node and alloc metrics 2016-08-01 19:52:20 -07:00
Kenjiro Nakayama 224ebc0129 Add LevelFilter test 2016-07-27 13:42:24 +09:00
Diptanu Choudhury cc37ec33cf Renamed Job.GetJobSummary to Job.Summary 2016-07-25 17:31:40 -07:00
Diptanu Choudhury 6193529040 Fixed more tests 2016-07-25 17:31:40 -07:00
Diptanu Choudhury 50842b88c7 Fixed some bugs 2016-07-25 17:26:38 -07:00
Diptanu Choudhury a5bb0ca6fc Moved the job endpoint around 2016-07-25 17:26:38 -07:00
Diptanu Choudhury 2ff2acbfc0 Added the job summary related endpoints 2016-07-25 17:26:38 -07:00
Alex Dadgar aa0c347450 remove unused file 2016-07-25 16:24:28 -07:00
Alex Dadgar 5a5d8f4ae3 Merge pull request #1465 from 42wim/ipv6-1318
Fix IPv6 advertise addresses
2016-07-25 16:14:15 -07:00
Wim c96f3ccb28 Use net.JoinHostPort 2016-07-25 23:34:08 +02:00
Diptanu Choudhury 471416ab20 Removing un-wanted dependencies 2016-07-25 14:17:52 -07:00
Wim a04907ad91 Fix IPv6 advertise addresses 2016-07-25 22:52:18 +02:00
Alex Dadgar b8817e4877 better flush and connection closed handling 2016-07-25 11:16:54 -07:00
Alex Dadgar 43d78b6d23 control-c works 2016-07-25 11:16:54 -07:00
Alex Dadgar aee152ee15 small fixes 2016-07-25 11:16:54 -07:00
Alex Dadgar 6e15bdbe36 Add logs command test 2016-07-25 11:16:54 -07:00
Alex Dadgar 1f600252e7 Handle skipping indexes 2016-07-25 11:16:54 -07:00
Alex Dadgar 120e9d14ee log tests 2016-07-25 11:16:54 -07:00
Alex Dadgar 85cc520365 Support non-following logs 2016-07-25 11:16:54 -07:00
Alex Dadgar b55e986c9f Read from correct offset 2016-07-25 11:16:01 -07:00
Alex Dadgar c84964bf6e Fix buffer reuse 2016-07-25 11:16:01 -07:00
Alex Dadgar 0327109300 tests 2016-07-25 11:16:01 -07:00
Alex Dadgar b2df901158 initial api and command 2016-07-25 11:16:01 -07:00
Alex Dadgar 3ea95bb91c initial log api impl 2016-07-25 11:16:01 -07:00
matt maier 7f2af04bcd Change circonus_broker_search_tag to circonus_broker_select_tag to match option in consul 2016-07-22 15:16:14 -04:00
matt maier 02d71eb6d3 Circonus integration for telemetry metrics 2016-07-22 12:33:10 -04:00
Mathias Lafeldt ab94704518
Fix typos in source code 2016-07-18 16:24:46 +02:00
Alex Dadgar d37651995f implement -n for tail 2016-07-13 13:26:09 -06:00
Alex Dadgar 661d100f2f address comments 2016-07-12 17:01:33 -06:00
Alex Dadgar 9059fc42cb Address more comments 2016-07-12 10:45:05 -06:00
Alex Dadgar 7dd14507ca Tests and handle conn close behavior better 2016-07-12 10:18:48 -06:00
Alex Dadgar e9ffadfdc6 initial comments 2016-07-11 10:58:18 -06:00
Alex Dadgar 281c1fbf39 StreamFramer tests 2016-07-10 13:57:20 -04:00
Alex Dadgar 1fe435a130 StreamFramer encapsulates the sending, heartbeating and batching behavior of frames 2016-07-10 13:57:04 -04:00
Alex Dadgar 958e0d6ca3 Only initialize watcher once, fix offsetting, implement tail non-follow 2016-07-10 13:57:04 -04:00
Alex Dadgar e100fc4422 Set up for testing 2016-07-10 13:57:04 -04:00
Alex Dadgar 2f44a0a069 Flush and use correct buffer size 2016-07-10 13:57:04 -04:00
Alex Dadgar 51ae7ace25 initial tail impl 2016-07-10 13:57:04 -04:00
Diptanu Choudhury 48b9684b1e Using net.JoinHostPort instead of handcrafting addrs 2016-07-08 16:45:14 -07:00
Diptanu Choudhury b180223f4b Allowing ports to be overriden in check definitions 2016-07-08 14:14:25 -07:00
Diptanu Choudhury 9c6ce3ff90 Merge pull request #1344 from hashicorp/b-consul-service-name
Fixed parsing of consul agent service names
2016-06-22 15:47:34 -07:00
Alex Dadgar f3bc85c20f use microsecond granularity 2016-06-22 15:20:56 -07:00
Diptanu Choudhury 69e046f63f Fixed parsing of consul agent service names 2016-06-22 13:52:43 -07:00
Alex Dadgar 9406739ba8 remove resolving client rpc addr 2016-06-17 14:55:37 -07:00
Sean Chittenden 9e287858de Merge pull request #1310 from hashicorp/b-logger
Create and pass only one `logger` object around per Agent
2016-06-17 12:16:35 -07:00
Sean Chittenden 46e2d54acf
Provide `nomad.Config` with a default `LogOutput` of `os.StdErr` 2016-06-17 06:44:10 -07:00
Sean Chittenden 9a60999100
Pass a logger arg to `NewClient` and `NewServer` 2016-06-16 23:29:23 -07:00