Sean Chittenden
108d2ca981
index on f-dyn-server-list: bd38cb4 Remove unused code
2016-06-10 15:50:11 -04:00
Sean Chittenden
ec7c78f533
Only poll Consul for servers when Nomad heartbeats begin to fail
...
When a deadline timer of 2x Server's last requested TTL expires,
begin polling Consul for Nomad Servers.
2016-06-10 15:50:11 -04:00
Sean Chittenden
a4b32c62e2
s/availble/runChecks/g
2016-06-10 15:50:11 -04:00
Sean Chittenden
d1442dc317
Reduce all forms of ConsulConfig down to a single struct
...
nomad/structs/config/consul.go's ConsulConfig is the canonical definition
for all things Consul now.
2016-06-10 15:50:11 -04:00
Sean Chittenden
e60580b279
Define a type for the PeriodicCallback handlers and ShutdownChannel
2016-06-10 15:50:11 -04:00
Sean Chittenden
17116fc5a7
Rebalance Nomad client RPCs among different Nomad servers.
...
Implement client/rpc_proxy.RpcProxy.
2016-06-10 15:50:11 -04:00
Sean Chittenden
88f3422d7c
Rename NewConsulService to NewSyncer
2016-06-10 15:49:37 -04:00
Sean Chittenden
b9789e0cf7
Rename client/consul/sync.PeriodicSync to Run
2016-06-10 15:49:37 -04:00
Sean Chittenden
768aab015d
Rename client/consul/sync.ConsulService to client/consul/sync.Syncer
...
Syncer describes the responsibility and actions of the type.
2016-06-10 15:49:37 -04:00
Sean Chittenden
e97652bbfb
Rename consul.ConsulConfig to consul.AgentConfig
...
There were two `ConsulConfig` structs running around, one of them
needed to go away. Rely on the package's path to provide context
for the type of AgentConfig.
2016-06-10 15:48:36 -04:00
Sean Chittenden
e36686a17d
Use consul/lib's RandomStagger
...
Removes four redundant copies of the method in the process.
2016-06-10 15:48:36 -04:00
Diptanu Choudhury
2e2e2e500e
Using a helper method to create service identifiers
2016-05-14 00:43:25 -07:00
Diptanu Choudhury
ecd995b283
Added some docs
2016-05-14 00:36:26 -07:00
Diptanu Choudhury
df9d256132
Making Nomad register services with consul in dev mode
2016-05-13 10:19:49 -07:00
Diptanu Choudhury
347cb890d2
Removed allocID and task name from consul service
2016-05-11 16:26:41 -07:00
Diptanu Choudhury
cec6c03b79
Fixed the consul tests
2016-05-11 15:22:58 -07:00
Diptanu Choudhury
2f8a3532ad
Refactored the signature of NewConsulService
2016-05-11 15:22:58 -07:00
Diptanu Choudhury
3a6ee08a32
Added some docs
2016-05-05 11:52:22 -07:00
Diptanu Choudhury
9a8ad773b3
Added logs to indicate when checks timeout
2016-05-05 10:01:38 -07:00
Diptanu Choudhury
f02adfdb71
Allowing registration of services which don't expose any ports
2016-04-14 13:26:39 +05:30
Diptanu Choudhury
397e7bafb7
Setting check state to critical if check result had an error
2016-04-05 10:15:38 -07:00
Diptanu Choudhury
dfca422608
Not logging if consul is unavailable
2016-04-02 14:48:10 -07:00
Diptanu Choudhury
d3d4eeb1c1
Using tls cert and key files while connecting to consul over https
2016-03-27 23:09:31 -07:00
Diptanu Choudhury
853c5120d0
Using a single timer to run checks
2016-03-25 16:11:45 -07:00
Diptanu Choudhury
449fdf6fb2
using switch to determine the state of checks
2016-03-25 14:26:56 -07:00
Diptanu Choudhury
b886636f6f
Using tickers instead of creating new timers
2016-03-25 14:18:04 -07:00
Diptanu Choudhury
4b1f7fa274
Renamed NomadChecks to CheckRunner and a fix for checkrunner start
2016-03-25 10:36:31 -07:00
Diptanu Choudhury
966b4ca26f
Renamed NomadChecks to CheckRunner
2016-03-24 21:17:33 -07:00
Diptanu Choudhury
12f03f6c49
Removing non relevant tests
2016-03-24 19:31:24 -07:00
Diptanu Choudhury
61469a1b7a
Added some docs
2016-03-24 19:30:02 -07:00
Diptanu Choudhury
91db8f44f1
Changing the logic of keep services
2016-03-24 19:19:13 -07:00
Diptanu Choudhury
2a9e522ed4
Added an impl for Nomad Checks
2016-03-24 19:00:24 -07:00
Diptanu Choudhury
a6711ea25f
Introducing ConsulContext
2016-03-24 15:57:16 -07:00
Diptanu Choudhury
f09bb1572a
Fixed merge conflicts
2016-03-24 15:09:50 -07:00
Diptanu Choudhury
d6588013f8
Running script checks periodically
2016-03-24 14:54:26 -07:00
Diptanu Choudhury
2a5f300f92
Added a check type for consul service to delegate certain checks
2016-03-24 14:54:26 -07:00
Diptanu Choudhury
6a62d4f452
Fixing check registration in perform sync
2016-03-24 14:12:09 -07:00
Diptanu Choudhury
fc156a736b
Changed a log line
2016-03-23 19:20:08 -07:00
Diptanu Choudhury
468584e824
Added some comments to the keep services method
2016-03-23 19:14:03 -07:00
Diptanu Choudhury
f6354ba114
Fixed the tests
2016-03-23 18:39:17 -07:00
Diptanu Choudhury
31baa6ce4b
Renamed vars and methods
2016-03-23 18:21:27 -07:00
Diptanu Choudhury
6649829c93
Renaming the SyncWithConsul method
2016-03-23 18:13:13 -07:00
Diptanu Choudhury
6e784024b8
Closing the shutdown ch on shutdown
2016-03-23 18:03:02 -07:00
Diptanu Choudhury
092f23a646
Locking on alloc runners before syncing with consul
2016-03-23 17:54:32 -07:00
Diptanu Choudhury
62242595fc
Using the name of the task and the alloc id in the service name
2016-03-23 17:35:29 -07:00
Diptanu Choudhury
83f41993aa
removing ids of services and checks on the server side
2016-03-23 17:12:53 -07:00
Diptanu Choudhury
66e35b0b96
Added a test to check whether services get updated
2016-03-23 16:25:53 -07:00
Diptanu Choudhury
9b966ec1e6
Fixing the test
2016-03-23 15:36:46 -07:00
Diptanu Choudhury
7dab719a66
Client sync with consul and removed unwanted services
2016-03-23 15:28:55 -07:00
Diptanu Choudhury
664ff44e85
Re-syncing task when it's updated
2016-03-23 14:34:43 -07:00