Commit Graph

12 Commits

Author SHA1 Message Date
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Michael Schurter
947516405a Add Header and Method support for HTTP checks 2017-08-17 16:44:21 -07:00
Alex Dadgar
3b300925a2 Fix alloc health with checks using interpolation
Fixes an issue in which the allocation health watcher was checking for
allocations health based on un-interpolated services and checks. Change
the interface for retrieving check information from Consul to retrieving
all registered services and checks by allocation. In the future this
will allow us to output nicer messages.

Fixes https://github.com/hashicorp/nomad/issues/2969
2017-08-07 16:27:08 -07:00
Alex Dadgar
4e71ba2e71 Distinct Property supports arbitrary limit
This PR enhances the distinct_property constraint such that a limit can
be specified in the RTarget/value parameter. This allows constraints
such as:

```
constraint {
  distinct_property = "${meta.rack}"
  value = "2"
}
```

This restricts any given rack from running more than 2 allocations from
the task group.

Fixes https://github.com/hashicorp/nomad/issues/1146
2017-07-31 16:52:13 -07:00
Alex Dadgar
3935656d14 Show submit time 2017-07-07 12:07:07 -07:00
Alex Dadgar
df40bd8a5f initial reconciler 2017-07-07 12:01:17 -07:00
Alex Dadgar
7a78eeed16 Add a comment 2017-04-10 12:07:57 -07:00
Alex Dadgar
68ba51c600 Hash host ID so its stable and well distributed
This PR takes the host ID and runs it through a hash so that it is well
distributed. This makes it so that machines that report similar host IDs
are easily distinguished.

Instances of similar IDs occur on EC2 where the ID is prefixed and on
motherboards created in the same batch.

Fixes https://github.com/hashicorp/nomad/issues/2534
2017-04-10 11:44:51 -07:00
Michael Schurter
2452f32476 Round two of env var cleaning
Should bring us into conformance with IEEE Std 1003.1, 2004 Edition:
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

1 alloc/op and ~80ns/op on my machine.
2017-03-08 16:46:13 -08:00
Diptanu Choudhury
f551dcb83e Making the job spec return api.Job 2017-02-16 13:52:39 -08:00
Sean Chittenden
31333eecae Add better verification of a host's HostID. 2017-02-02 16:24:32 -08:00
Diptanu Choudhury
6d669fb48e Moved functions to helper from structs 2017-01-18 15:55:14 -08:00