Commit Graph

717 Commits

Author SHA1 Message Date
Michael Schurter
e04267da4f Fix comment 2017-07-25 12:13:05 -07:00
Michael Schurter
9a3f6af77e Forgot to setcmdenv
This would leak a consul agent
2017-07-25 12:09:57 -07:00
Michael Schurter
4666d85a29 Use seen more conservatively 2017-07-24 16:48:40 -07:00
Michael Schurter
8e5d95df08 Always increment failures...
...as it's used in calculating the backoff
2017-07-24 15:37:53 -07:00
Michael Schurter
82ea86fb6f Track whether Consul has ever been seen
Need a way to squelch Consul operation errors on shutdown. If it's never
been seen don't log errors about deregs failing.
2017-07-24 12:12:02 -07:00
Michael Schurter
b01a00a7f3 Synchronously deregister agent on shutdown
Fixes #2891

Previously the agent services and checks were being asynchrously
deregistered on shutdown, so it was a race between the sync goroutine
deregistering them and Nomad shutting down.

This switches to synchronously deregister agent serivces and checks
which doesn't really have a downside since the sync goroutines retry
behavior doesn't help on shutdown anyway.
2017-07-24 11:40:37 -07:00
Alex Dadgar
08c2ba9bc6 Parallel client tests (#2890)
* alloc_runner

* Random tests

* parallel task_runner and no exec compatible check

* Parallel client

* Fail fast and use random ports

* Fix docker port mapping

* Make concurrent pull less timing dependant

* up parallel

* Fixes

* don't build chroots in parallel on travis

* Reduce parallelism on travis with lxc/rkt

* make java test app not run forever

* drop parallelism a little

* use docker ports that are out of the os's ephemeral port range

* Limit even more on travis

* rkt deadline
2017-07-22 19:04:36 -07:00
Alex Dadgar
bce1acef0a remove root requirement on consul integration check 2017-07-21 19:32:41 -07:00
Alex Dadgar
700147c90e Speed up client startup 2017-07-20 22:34:24 -07:00
Alex Dadgar
da25a3d5ce Switch to in-process agent 2017-07-20 21:07:32 -07:00
Alex Dadgar
2cf5a7555d Merge pull request #2874 from hashicorp/f-command-agent-tests
Parallelize the command/agent tests and add new test agent
2017-07-20 20:27:49 -07:00
Alex Dadgar
50a58976c6 Fix bootstrapping and waiting 2017-07-20 20:15:37 -07:00
Alex Dadgar
a73e945067 More parallel 2017-07-20 09:36:34 -07:00
Alex Dadgar
873587381d New test agent 2017-07-19 22:14:36 -07:00
Alex Dadgar
25ada7bbab Don't print atlas 2017-07-19 20:25:06 -07:00
Alex Dadgar
dedb9127a3 Merge pull request #2866 from hashicorp/f-autocomplete-agent
Agent command autocompletes to hcl/json files
2017-07-19 13:18:32 -07:00
Michael Schurter
6c3a739031 Too lazy to remember the right formatter for floats 2017-07-19 11:53:18 -07:00
Alex Dadgar
8a371e0bd4 Fix predictor 2017-07-19 11:51:01 -07:00
Alex Dadgar
3127ce320c Agent command autocompletes to hcl/json files 2017-07-19 11:28:16 -07:00
Michael Schurter
6679c052b5 Merge pull request #2858 from hashicorp/b-2849-deploy-json
Implement -json for job deployments
2017-07-19 10:15:01 -07:00
Michael Schurter
b124a92bc8 Error -> Errof 2017-07-19 10:00:57 -07:00
Alex Dadgar
bb45b95bc4 Allow tuning of heartbeat ttls
This PR allows tuning of heartbeat TTLs. An example of very aggressive
settings is as follows:

```
server {
  heartbeat_grace = "1s"
  min_heartbeat_ttl = "1s"
  max_heartbeats_per_second = 200.0
}
```
2017-07-19 09:38:35 -07:00
Michael Schurter
a83d6f996e Never remove unknown agent services
Fixes #2827

This is a tradeoff. The pro is that you can run separate client and
server agents on the same node and advertise both. The con is that if a
Nomad agent crashes and isn't restarted on that node in the same mode
its entry will not be cleaned up.

That con scenario seems far less likely to occur than the scenario on
the pro side, and even if we do leak an agent entry the checks will be
failing so nothing should attempt to use it.
2017-07-18 13:23:01 -07:00
Alex Dadgar
beb01f1754 test fixes 2017-07-07 14:11:27 -07:00
Alex Dadgar
38e50eedb1 check id method name changed 2017-07-07 12:15:09 -07:00
Alex Dadgar
f0a090c6e8 Disallow update stanza on batch jobs
This PR:
* disallows update stanzas on batch jobs
* undeprecates the stagger field
* changes the way warnings are returned
2017-07-07 12:11:39 -07:00
Alex Dadgar
aaf5ab0a21 Job stability 2017-07-07 12:10:04 -07:00
Alex Dadgar
591ef9c9f3 Rename CreateDeployments and remove cancelling behavior in state_store 2017-07-07 12:10:04 -07:00
Alex Dadgar
f72bbaa370 Client watches for allocation health using task state and Consul checks
This PR adds watching of allocation health at the client. The client can
watch for health based on the tasks running on time and also based on
the consul checks passing.
2017-07-07 12:10:04 -07:00
Alex Dadgar
9220836cb4 JobVersions returns struct with optional diff 2017-07-07 12:05:57 -07:00
Alex Dadgar
86e49b97d9 Add config options 2017-07-07 12:05:56 -07:00
Alex Dadgar
d0a8332140 job deployment endpoint + api 2017-07-07 12:05:56 -07:00
Alex Dadgar
31daf93779 HTTP Endpoints 2017-07-07 12:03:11 -07:00
Michael Schurter
9d2682e1bb Fix api endpoint test 2017-07-06 10:45:44 -07:00
Michael Schurter
450e347708 Add support for go-getter modes
Fixes #2678
2017-07-06 10:45:44 -07:00
Michael Schurter
79b7cfd506 Fix no_host_uuid parsing
Need to pointerify it to default to true since we can't tell false from
unset if it's not a pointer.
2017-07-03 17:41:20 -07:00
Michael Schurter
6b3ae9acd8 Merge pull request #2709 from hashicorp/f-advertise-docker-ips
Advertise driver-specific addresses
2017-07-03 14:04:12 -07:00
Michael Schurter
bf6c736ffe Merge pull request #2735 from hashicorp/f-no_host_uuid-true
Default no_host_uuid to true instead of false
2017-07-03 13:18:25 -07:00
Alexandre Dantas
8d07eca012 Fixing issue where use_node_name was always been set as false when merging telemetry configurations 2017-07-02 00:31:09 -03:00
Michael Schurter
3e13aa253d Properly normalize IPv6 addresses
A fix to #2739 instead of forcing IPv6 users to always specify a port as
well.

Prior to this commit IPv6 advertise addresses which lacked a port would
fail instead of having the default port added because
`net.SplitHostPort(someipv6)` returns a different error than
`net.SplitHostPort(someipv4)`.
2017-06-29 10:46:31 -07:00
Michael Schurter
85860dcb67 Fix test error formats 2017-06-26 12:53:43 -07:00
Michael Schurter
b8de3608fb Default no_host_uuid to true instead of false
The host UUID isn't unique in many virtualized cases and of dubious
value even when it is univerally unique. Default to a random UUID.
2017-06-23 16:23:01 -07:00
Michael Schurter
3f37be369d Move caonicalization from nomad/structs/ to api/ 2017-06-21 17:19:08 -07:00
Michael Schurter
a464ca3287 Remove debug logging 2017-06-21 17:19:08 -07:00
Michael Schurter
4117c8b3a2 Fix Service.AddressMode changes during task updates 2017-06-21 17:19:08 -07:00
Michael Schurter
8a7df57227 Test driver network advertisement and checks 2017-06-21 17:19:08 -07:00
Michael Schurter
3fddb05fc8 Implement DriverNetwork and Service.AddressMode
Ideally DriverNetwork would be fully populated in Driver.Prestart, but
Docker doesn't assign the container's IP until you start the container.

However, it's important to setup the port env vars before calling
Driver.Start, so Prestart should populate that.
2017-06-21 17:19:08 -07:00
Michael Schurter
0832793fac Fix path used by Nomad Server HTTP Check
Fixes #2701
2017-06-21 10:41:28 -07:00
Michael Schurter
236ef21489 Merge pull request #2636 from hashicorp/f-gc-alloc-limit
Add new gc_max_allocs tuneable
2017-05-30 16:14:09 -07:00
Michael Schurter
aac319cd16 Merge pull request #2654 from hashicorp/f-env-consul
Add envconsul-like support and refactor environment handling
2017-05-30 14:40:14 -07:00