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
Chris Bednarski
02385f0dbc
Change Modfied to Modified
2016-06-13 15:09:13 -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
e547f1a86d
use base 1024 for bytes not 1000
2016-06-12 14:20:39 -07:00
Alex Dadgar
b3a48f5d53
reworked alloc-status command
2016-06-12 14:08:47 -07:00
Alex Dadgar
e931b42473
unify cli output
2016-06-12 13:16:07 -07:00
Alex Dadgar
a49bb31561
unify units
2016-06-12 11:19:45 -07:00
Alex Dadgar
974c713b4d
show allocation resources seperate from host
2016-06-12 11:19:45 -07:00
Alex Dadgar
61fcebf296
initial refactor and cleanup
2016-06-12 11:19:45 -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
Alex Dadgar
480a281031
Merge pull request #1243 from hashicorp/f-run-modify-index
...
Add check-index flag to nomad run
2016-06-11 16:12:53 -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
Diptanu Choudhury
0a9a3918d6
Not reset-ing the list of pids if they don't change
2016-06-11 01:19:50 +02:00
Diptanu Choudhury
01054db4fa
Calculating total ticks consumed in the nomad client
2016-06-10 23:14:33 +02:00
Diptanu Choudhury
d9d5a95160
Using humanize to convert memory usage to MB
2016-06-10 22:24:33 +02:00
Diptanu Choudhury
2d3798b076
Calculating the cpu ticks in nomad client
2016-06-10 22:22:32 +02: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
Sean Chittenden
efe00d2ccd
Update Syncer.Run() to call SyncServices().
2016-06-10 15:54:39 -04:00
Sean Chittenden
83775c5c8b
Add "Service Groups" to the Syncer.
...
Now the right way to register services with the Syncer is to call
`SetServices(groupName, []*services)`. This was required to allow
the Syncer to sync either the Client, Server, or Both using a
single Syncer.
2016-06-10 15:54:39 -04:00
Sean Chittenden
c54539b860
Initialize Consul for the Nomad Agent in a more uniform way.
...
Decompose Client and Server registration into `setupClient()` and
`setupServer()`, respectively.
2016-06-10 15:54:39 -04:00
Sean Chittenden
06e5e615a8
Rename command/agent/consul/sync.go to syncer.go
2016-06-10 15:54:39 -04:00
Sean Chittenden
d307ca2c28
Begin leveraging the Agent-level consul.Syncer
2016-06-10 15:54:39 -04:00