Alex Dadgar
c35b1be845
Set running when restoring
2016-06-28 13:47:59 -07:00
Wojciech Bederski
a73422b4ff
Fix docker driver lockup during nomad boot
...
Unit mismatch caused docker driver to wait almost indefinitely during boot
(when one or more containers were a bit uncooperative during StopContainer())
This should fix problems described in #1202
2016-06-28 14:26:47 +02:00
Cameron Davison
d1e7d9c50f
write state to temp file and then rename
2016-06-27 12:29:33 -05:00
Jake Champlin
f094969c7b
Update failing tests
2016-06-23 11:28:17 -04:00
Alex Dadgar
14e950f882
Treat float as int
2016-06-22 15:09:39 -07:00
Alex Dadgar
4ff8edd2da
Floor CPU MHz and total compute and mark hostname as unique
2016-06-22 15:01:36 -07:00
Diptanu Choudhury
0a10873aa6
Merge pull request #1335 from hashicorp/f-set-docker-timeout
...
Setting a timeout in the docker client
2016-06-21 17:00:14 -07:00
Diptanu Choudhury
2837d3395d
Setting a timeout in the docker client
2016-06-21 16:58:21 -07:00
Diptanu Choudhury
1d5c5b18f3
Making SSL default
2016-06-21 16:41:14 -07:00
Sean Chittenden
8bdb38d016
Code golf
...
Pointed out by: @dadgar
2016-06-21 14:26:01 -07:00
Sean Chittenden
df4fe2e502
Fix the shuffling of remote datacenters.
...
Pointed out by: @ryanuber
2016-06-21 13:37:22 -07:00
Diptanu Choudhury
88ac1b33a4
Not emitting per-pid stats and added the total ticks consumed by a Task
2016-06-20 17:30:25 -07:00
Alex Dadgar
19024f4da0
Merge pull request #1322 from hashicorp/b-docker-logs-splicing
...
Make line copy to avoid being overriden by subsequent scans
2016-06-20 13:17:49 -07:00
Alex Dadgar
661dc200f3
Make line copy to avoid being overriden by subsequent scans
2016-06-20 13:14:43 -07:00
Alex Dadgar
3cd9c9590b
guard against NaN
2016-06-20 10:29:46 -07:00
Alex Dadgar
7b83503596
finer grain locking
2016-06-20 10:19:06 -07:00
Alex Dadgar
744270590b
Guard against bad restore
2016-06-17 14:58:53 -07:00
Alex Dadgar
c9f7467ccb
Driver tests use client default config
2016-06-17 14:24:49 -07:00
Sean Chittenden
7b9961f09b
Initialize the stats helpers before accessing them for the first time
2016-06-17 13:23:30 -07:00
Sean Chittenden
9cb649d247
Merge pull request #1307 from hashicorp/f-fingerprint-cpus
...
F fingerprint cpus
2016-06-17 12:23:40 -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
21b84fc3e6
Memoize the CPU stats. Error if CPU fingerprinting fails.
2016-06-17 12:13:53 -07:00
Alex Dadgar
27c6398639
debug message when stopping container
2016-06-17 11:52:44 -07:00
Sean Chittenden
686c125fea
Record and use only the first Mhz from the CPU fingerprinter.
...
Assume all cores are the same speed.
2016-06-17 11:06:57 -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
Sean Chittenden
4cc90753f8
In the debug log, split the unit from the measurement
...
awk(1) friendly is UNIX(tm) friendly.
2016-06-16 23:07:13 -07:00
Sean Chittenden
2dcb591cd8
Warn when we're unable to fingerprint the CPU Mhz
2016-06-16 23:07:13 -07:00
Sean Chittenden
b8e63411c0
Explicitly call `cpu.Counts()` to determine the CPU core count
...
Much safer than counting the number of InfoStat structs returned.
2016-06-16 23:07:13 -07:00
Sean Chittenden
d17af396ca
Create config.DefaultConsulConfig()
2016-06-16 20:41:05 -07:00
Sean Chittenden
fd18eb7fdb
Only register the Client services reaper when `consul.auto_advertise` is enabled
2016-06-16 18:24:58 -07:00
Sean Chittenden
1ce2cc6141
`conf` -> `config`
2016-06-16 17:05:29 -07:00
Sean Chittenden
015248a67f
Fix tests for NewServer() in client mode.
...
Pointy-hat: sean-
I'm positive I've done this before.
2016-06-16 16:34:22 -07:00
Sean Chittenden
952b6ce7b5
Only auto-join clients if `client_auto_join` is true
2016-06-16 14:47:21 -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
ed67f1a347
Merge pull request #1285 from hashicorp/fix-selinux-options
...
Added a client options for setting selinux options
2016-06-16 22:45:24 +02:00
Diptanu Choudhury
266c417ac8
Changed the client options for docker volume selinux labels
2016-06-16 21:41:02 +01:00
Alex Dadgar
fe588a2469
Guard against restoring a nil task in task_runner
2016-06-16 11:55:40 -07:00
Sean Chittenden
008d75184b
Use the `%+q` verb in log messages (vs `%q`).
2016-06-16 11:03:51 -07:00
Alex Dadgar
7375d828e1
remove trace
2016-06-15 15:47:59 -07:00
Sean Chittenden
5e0ced2ae7
Shuffle all datacenters vs only the nearest N datacenters.
...
Per discussion, we want to be aggressive about fanning out vs possibly
fixating on only local DCs. With RPC forwarding in place, a random walk
may be less optimal from a network latency perspective, but it is guaranteed
to eventually result in a converged state because all DCs are candidates
during the bootstrapping process.
2016-06-15 12:40:51 -07:00
Sean Chittenden
2123460cf0
Bump various Consul search limits
...
Client: Search limit increased from 4 random DCs to 8 random DCs, plus nearest.
Server: Search factor increased from 3 to 5 times the bootstrap_expect.
This should allow for faster convergence in large environments (e.g.
sub-5min for 10K Consul DCs).
2016-06-15 12:40:51 -07:00
Alex Dadgar
cf99fc3173
Use Status.Peers instead of Status.Ping
2016-06-15 12:00:20 -07:00
Diptanu Choudhury
fa216199ce
Added documentation
2016-06-15 02:42:15 +02:00
Diptanu Choudhury
e08083acfe
Added a client options for setting selinux options
2016-06-15 02:33:09 +02: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
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
d019d8ef8e
implemented reconciliation of unwanted services
2016-06-13 14:52:26 +02:00