Alex Dadgar
d86b3977b9
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
2650bb1d12
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
2471b86dec
Show submit time
2017-07-07 12:07:07 -07:00
Alex Dadgar
0d42b5d421
initial reconciler
2017-07-07 12:01:17 -07:00
Michael Schurter
89abaf5ef4
Don't fail on first error detecting cpu stats
...
Since cpu.Counts() never returns an error this doesn't functionally
change anything today.
2017-07-03 14:51:02 -07:00
Michael Schurter
fd9bef768f
Move task env into execcontext
...
Also inject PATH into rkt commands since we're no longer appending host
env vars for it.
2017-05-23 13:53:34 -07:00
Alex Dadgar
9b9d69f577
Add a comment
2017-04-10 12:07:57 -07:00
Alex Dadgar
2321e8a4a0
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
Alex Dadgar
abce18749d
Fix tests that exec nomad
2017-03-14 16:04:33 -07:00
Alex Dadgar
a1a7941dec
Various fixes
...
This PR:
* Uses Go 1.8 executable lookup
* Stores any err message from stats init method
* Allows overriding of Cpu Compute for hosts where it can't be detected
2017-03-14 12:56:31 -07:00
Michael Schurter
16adc44358
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
Alex Dadgar
5be806a3df
Fix vet script and fix vet problems
...
This PR fixes our vet script and fixes all the missed vet changes.
It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Diptanu Choudhury
7567209857
Making the job spec return api.Job
2017-02-16 13:52:39 -08:00
Sean Chittenden
adb5be23ef
Add better verification of a host's HostID.
2017-02-02 16:24:32 -08:00
Diptanu Choudhury
e927de02d2
Moved functions to helper from structs
2017-01-18 15:55:14 -08:00
Michael Schurter
d36d716bf9
Add docs for generating example certificates
2016-11-15 17:22:54 -08:00
Michael Schurter
345a2640dc
Fix tlsutil tests
2016-11-10 12:18:13 -08:00
Alex Dadgar
5fba85c092
get tlsutil tests to compile - need to regenerate the certificates
2016-11-09 14:41:08 -08:00
Michael Schurter
ae680c9c81
Remove incorrectly committed line and wrong comment
2016-11-01 15:57:21 -07:00
Michael Schurter
536c2921e9
Remove ServerName because we verify based on region
2016-11-01 14:17:31 -07:00
Diptanu Choudhury
1a8fa8c8d5
Making Nomad TLS configs region aware
2016-11-01 11:55:29 -07:00
Diptanu Choudhury
7c61e115bd
Moved tlsutil into helpers
2016-10-25 16:05:37 -07:00
Alex Dadgar
751aa114bf
Fix Vault parsing of booleans
2016-10-10 18:04: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
Sean Chittenden
21b84fc3e6
Memoize the CPU stats. Error if CPU fingerprinting fails.
2016-06-17 12:13:53 -07:00
Diptanu Choudhury
7fb507e810
Moving the clkspeed code to helper
2016-06-11 17:31:49 +02:00
Diptanu Choudhury
ea65fd7925
Checking in the stats helper package
2016-06-10 23:46:33 +02:00
Sean Chittenden
dc28ab0cb5
Speling police
2016-05-15 09:41:34 -07:00
Alex Dadgar
b4bb28c425
Job diff using generic structures
2016-05-10 22:23:34 -07:00
Ivo Verberk
cd301327ed
Add comments and fix a typo
2016-04-11 23:09:09 +02:00
Ivo Verberk
542603dec6
Add helper to validate raw configuration data
2016-04-10 00:42:43 +02:00
Diptanu Choudhury
5439d4c23c
Interpolating service tags
2016-03-28 15:02:00 -07:00
Aleksejs Sinicins
0ce9ea3bab
Allow dashes in var names
2016-02-27 18:42:33 +02:00
Alex Dadgar
5018f5dd1e
Only interpret vars wrapped in braces
2016-02-04 17:26:46 -08:00
Alex Dadgar
1ceb6f012a
Fix a bunch of tests
...
Up timeouts
trusty travis beta
Increase timeouts
2016-01-20 16:03:53 -08:00
Alex Dadgar
3ba1c9b76b
merge
2016-01-11 09:58:26 -08:00
Diptanu Choudhury
f6fb42835e
Using cgo dependencies to look up users
2015-12-15 11:12:13 -08:00
Chris Bednarski
1e3e120646
Added build flag to user-lookup so it does not build on windows
2015-12-01 14:28:12 -08:00
Chris Bednarski
9292a97062
Merge branch 'user-lookup-nocgo' of https://github.com/carlosdp/nomad into b-user-lookup
2015-12-01 13:44:56 -08:00
Carlos Diaz-Padron
55e49506f0
Refactor out userLookup to helper package
...
Also replaces user.Lookup in exec driver
2015-12-01 11:59:55 -08:00
Diptanu Choudhury
29915ddd16
Moving the args to helper
2015-11-26 14:13:19 -08:00
Chris Hines
5b2168bb12
Use package testtask and httptest.Server to make client/driver tests OS independent.
2015-11-25 15:56:20 -05:00
Chris Hines
d7ebe099c1
Factor portable test task out of client/driver/executor.
2015-11-24 20:59:42 -05:00
Alex Dadgar
88391eedfb
Search path
2015-11-03 13:26:09 -08:00
Alex Dadgar
5562fc7672
Create Spawn pkg that handles IPC with the spawn-daemon and update exec_linux to use that
2015-11-02 20:28:37 -08:00
Ivo Verberk
c6e1b13b51
Fix vet warnings
2015-10-07 12:26:58 +02:00
Alex Dadgar
8230008114
Correctly scan the CWD for the nomad executable
2015-09-30 14:30:09 -07:00
Alex Dadgar
0e3f21b34f
Linux executor with cgroup isolation support
2015-09-21 09:08:57 -07:00
Armon Dadgar
adb771ed1d
agent: moving functions into helpers
2015-08-23 16:57:54 -07:00