Sean Chittenden
438c1e149b
Fix tests
2016-06-16 22:26:45 -07:00
Sean Chittenden
59c54e9aeb
Fix tests, don't take the address of DefaultConsulCommand()
2016-06-16 21:21:39 -07:00
Sean Chittenden
d17af396ca
Create config.DefaultConsulConfig()
2016-06-16 20:41:05 -07:00
Sean Chittenden
e58c2a2ed4
Remove client registration of RPC services, only servers have an RPC interface
2016-06-16 18:14:59 -07:00
Sean Chittenden
2a2b35d1bc
Use /v1/agent/servers
(vs /v1/agent/self
).
2016-06-16 17:40:47 -07:00
Sean Chittenden
26cc057751
Automatically register service checks for HTTP, RPC, and Serf.
2016-06-16 17:34:25 -07:00
Sean Chittenden
ec77a1869e
Test for errors
2016-06-16 14:43:46 -07:00
Sean Chittenden
af55b74114
Merge pull request #1276 from hashicorp/f-consul-server-autojoin
...
Teach Nomad servers how to fall back to Consul.
2016-06-16 14:40:45 -07:00
Diptanu Choudhury
14747848f7
Removed the stats block from client configuration
2016-06-16 21:30:29 +01:00
Sean Chittenden
b0fecbefc1
Define BootstrapExepct
as an int32
so it can be manipulated atomically.
2016-06-16 12:00:15 -07:00
Sean Chittenden
f05514335b
Teach Nomad servers how to fall back to Consul.
2016-06-15 12:40:51 -07:00
Diptanu Choudhury
201dd28743
Merge pull request #1284 from hashicorp/add-warn-message
...
Added a warn message for deprecated consul options
2016-06-15 11:33:24 +02:00
Diptanu Choudhury
fd80e6ed0f
Added a warn message for deprecated consul options
2016-06-15 02:31:57 +02:00
Alex Dadgar
aea21affdb
Document consul configuration
2016-06-14 15:21:57 -07:00
Sean Chittenden
6e22b680ce
Disambiguate auto_join
from auto_register
, rename reg to auto_advertise
.
...
Provide an option that describes the value to the user vs the
operation performed by the software. Momentarily introducing
`auto_join`
2016-06-14 12:11:38 -07:00
Sean Chittenden
10ce8f27d4
Temporarily disable various syncer checks due to the API changes made earlier today.
2016-06-13 19:52:17 -07:00
Sean Chittenden
a54b4e08f8
Drive-by comment correction
2016-06-13 18:14:50 -07:00
Alex Dadgar
4b04e503f3
address comments
2016-06-13 17:32:18 -07:00
Alex Dadgar
8bbf4a55e5
Fix IDs and domain scoping
2016-06-13 16:30:58 -07:00
Diptanu Choudhury
2e10458367
Removing unwated line of code
2016-06-13 15:37:55 +02:00
Diptanu Choudhury
d019d8ef8e
implemented reconciliation of unwanted services
2016-06-13 14:52:26 +02:00
Alex Dadgar
753d50f3d4
agent just calls run
2016-06-12 22:30:52 -07:00
Alex Dadgar
232654cdee
register checks
2016-06-12 21:28:56 -07:00
Alex Dadgar
a82c2bb058
Do not reconcile in client and cleanup executor a bit
2016-06-12 18:22:07 -07:00
Alex Dadgar
e4506ea333
fix test
2016-06-12 16:48:55 -07:00
Alex Dadgar
c68d23b7d6
Merge pull request #1264 from hashicorp/b-rename-services
...
Rename ConsulService back to Service
2016-06-12 16:44:49 -07:00
Diptanu Choudhury
751b2e1bcb
Remove initial delay of registering services with consul
2016-06-13 01:42:56 +02:00
Alex Dadgar
8e231fa382
Rename ConsulService back to Service
2016-06-12 16:36:49 -07:00
Alex Dadgar
fdda90229f
only support latest and remove ring buffer
2016-06-12 09:32:38 -07:00
Alex Dadgar
e952540f6f
Allocation resources returned in a struct
2016-06-11 21:04:10 -07:00
Sean Chittenden
2f036231e5
Merge pull request #1201 from hashicorp/f-dyn-server-list
...
Dynamic Server Lists/Client Bootstrapping via consul.
2016-06-11 18:58:25 -04:00
Sean Chittenden
917766a3df
Prefer %+q
over %q
in log messages.
2016-06-11 18:17:20 -04:00
Alex Dadgar
5797534d16
Don't require slash for node stats
2016-06-11 13:15:57 -07:00
Sean Chittenden
bbd8dfa798
goling(1) compliance pass (e.g. Rpc* -> RPC)
2016-06-10 23:38:28 -04:00
Sean Chittenden
bc771d35df
Query for the Nomad service across multiple Consul datacenters.
2016-06-10 23:05:14 -04:00
Sean Chittenden
d99467ef5e
Always create a consul.Syncer. Use a default Consul Config if necessary.
2016-06-10 15:55:27 -04:00
Sean Chittenden
f6a0459ae5
Always create a consul.Syncer. Use a default Consul Config if necessary.
2016-06-10 15:55:27 -04:00
Sean Chittenden
e69232dd73
Commit miss, bump to 5s
2016-06-10 15:54:39 -04:00
Sean Chittenden
26b1e826d7
golint(1) police
2016-06-10 15:54:39 -04:00
Sean Chittenden
c92306f020
Stash client and server registration behind consul.auto_register
2016-06-10 15:54:39 -04:00
Sean Chittenden
68aebff84d
Only return the Client's server addresses, never mix-in server peers
2016-06-10 15:54:39 -04:00
Sean Chittenden
447fe59fd2
Hand wave over the syncer tests atm, these will be fixed shortly.
2016-06-10 15:54:39 -04:00
Sean Chittenden
fa7285cb5b
Don't spam the consul if Consul is not available.
...
Log once when Consul goes away, and log when Consul comes back.
2016-06-10 15:54:39 -04:00
Sean Chittenden
a1a0c313de
Skip nil check for agent's consulSyncer is always not nil
2016-06-10 15:54:39 -04:00
Sean Chittenden
a2109af862
Properly cover Syncer attributes with the registryLock.
...
trackedServices, delegateChecks, trackedChecks, and checkRunners
should all be covered. This lock needs to be reasonably narrow and
can't use defer due to possible recursive locking concerns further
downstream from the call sites.
2016-06-10 15:54:39 -04:00
Sean Chittenden
f9b561b52f
On Syncer Shutdown, remove all services that match a Syncer's prefix.
2016-06-10 15:54:39 -04:00
Sean Chittenden
57e084e4df
Sync checks with Consul by comparing the AgentCheckReg w/ ConsulService
...
The source of truth is the local Nomad Agent. Any checks are not local that
have a matching prefix are removed. Changed checks are re-registered
and missing checks are re-added.
2016-06-10 15:54:39 -04:00
Sean Chittenden
197feae679
Sync services with Consul by comparing the AgentServiceReg w/ ConsulService
...
The source of truth is the local Nomad Agent. Any services not local that
have a matching prefix are removed. Changed services are re-registered
and missing services are re-added.
2016-06-10 15:54:39 -04:00
Sean Chittenden
9a223936bb
Generate and sync Consul ServiceIDs consistently
2016-06-10 15:54:39 -04:00
Sean Chittenden
bcad11cc2a
Rename runChecks to consulAvailable
...
Apologies in advance for the variable thrash, the fingerprinter is
no longer used to gate whether or not Consul is available any more.
2016-06-10 15:54:39 -04:00