Michael Schurter
499ada5a64
Merge pull request #2585 from hashicorp/b-2554-container-exec
...
Execute exec/java script checks in containers
2017-05-05 10:31:18 -07:00
Michael Schurter
a39eef0f11
Test pre06ScriptCheck
2017-05-04 16:49:00 -07:00
Michael Schurter
9012357414
Oops, remove dev logging
2017-05-04 16:27:04 -07:00
Michael Schurter
426c696404
Reuse ExecScript implementation
2017-05-04 16:21:40 -07:00
Alex Dadgar
3642434293
Fix tests
2017-05-03 15:14:19 -07:00
Kate Taggart
82d60ce670
fix test.
2017-05-03 12:45:59 -07:00
Kate Taggart
6ea156b565
responding to feedback on PR: remove Region from Node struct, some grammatical niceties.
2017-05-03 12:45:59 -07:00
Kate Taggart
4a4417d556
I think I did it.
2017-05-03 12:45:59 -07:00
Kate Taggart
530cf03177
allow region to also be interpolated, like datacenter.
2017-05-03 12:45:59 -07:00
Kate Taggart
d10bfb46c1
just found out dc and region are going to be a bit different, as Region didn't previously exist in the Node struct.
2017-05-03 12:45:59 -07:00
Kate Taggart
a5c4663efb
add helper functions to set and clear dc, region names.
2017-05-03 12:45:59 -07:00
Kate Taggart
aeec7b3591
add dc and region to task env building function. flipped order of a couple functions to be consistent with the ordering of the rest of that section.
2017-05-03 12:45:59 -07:00
Kate Taggart
cf1b298f72
starting the jelly bean trail for two new env vars
2017-05-03 12:45:59 -07:00
Pete Wildsmith
aa2da9ea50
address feedback
2017-04-28 10:27:37 +01:00
Pete Wildsmith
06f3aac9de
clean up consul earlier when destroying a task
2017-04-27 23:29:30 +01:00
Michael Schurter
2cc492c95e
Test pre-0.6 script check upgrade path
2017-04-25 11:41:03 -07:00
Michael Schurter
8f518c4c1f
Test env+cgroups for exec driver checks
2017-04-25 11:13:06 -07:00
Michael Schurter
29f222d461
Change raw_exec to use simplified exec wrapper
2017-04-21 16:50:20 -07:00
Michael Schurter
90f5e232a5
Switch java/exec to use Exec in Executor
2017-04-21 16:25:49 -07:00
Michael Schurter
fe2b3e382d
Restart tasks on upgrade with script checks and old executors
2017-04-21 16:25:49 -07:00
Michael Schurter
fb3b30bba9
Fix Windows build.
2017-04-19 13:16:48 -07:00
Michael Schurter
b9ea2765ec
Thanks go vet!
2017-04-19 13:05:41 -07:00
Michael Schurter
8e0c97e52f
Unregister from Consul when waiting for restart
2017-04-19 12:42:48 -07:00
Michael Schurter
4f224132ad
Remove stale comment
2017-04-19 12:42:47 -07:00
Michael Schurter
db8aabe1c3
Fix circular test imports
2017-04-19 12:42:47 -07:00
Michael Schurter
0e0845e94b
Use a DriverAbility to expose Exec functionality
2017-04-19 12:42:47 -07:00
Michael Schurter
fd69d48244
Move removal from Consul into TaskRunner cleanup
2017-04-19 12:42:47 -07:00
Michael Schurter
63a8307255
Move ScriptExecutor to driver
2017-04-19 12:42:47 -07:00
Michael Schurter
b6937912d8
Add UpdateTask method instead of Remove/Add
2017-04-19 12:42:47 -07:00
Michael Schurter
10cb924b2c
Refactor Consul Syncer into new ServiceClient
...
Fixes #2478 #2474 #1995 #2294
The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.
The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.
Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.
Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
2017-04-19 12:42:47 -07:00
Michael Schurter
17471bf7c0
Set ownership on directories in chroot
...
Also support getOwner on all Unixes as they all have `Stat_t.{U,G}id`
2017-04-17 12:41:33 -07:00
Michael Schurter
1cffc7310e
Don't disable hardlinking!
2017-04-17 11:03:15 -07:00
Michael Schurter
2fe3de16be
Chown files when copying into chroot
...
Fixes #2552
Not needed when hardlinking. Only adds Linux support but other OS's may
be easy.
2017-04-17 11:03:15 -07:00
Alex Dadgar
3018ae07bb
Sync allocation state before waiting for a destroy
...
This change ensures that the client syncs allocation state with the
servers before entering its wait loop for the allocation to be
destroyed.
Fixes https://github.com/hashicorp/nomad/issues/2563
2017-04-14 13:09:54 -07:00
Alex Dadgar
374c96b600
Merge pull request #2519 from hashicorp/b-sticky-tmp
...
Add sticky bit to temp directory
2017-04-12 14:59:14 -07:00
Alex Dadgar
211a8409b9
Merge pull request #2541 from hashicorp/f-stable-distributed-id
...
Hash host ID so its stable and well distributed
2017-04-11 11:27:53 -07:00
Alex Dadgar
8d07bd8f9c
Add ExtraHosts to Docker driver
...
This PR allows job submitters to add extra hosts to the containers
/etc/hosts file.
Fixes https://github.com/hashicorp/nomad/issues/2546
2017-04-11 10:52:41 -07:00
Diptanu Choudhury
b0a20b4dc9
Fixed typo
2017-04-10 11:45:11 -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
Diptanu Choudhury
536fdde121
Added a test
2017-04-08 13:44:21 -07:00
Alex Dadgar
719bddaaec
Merge branch 'f-ipv6-fingerprint' of github.com:hashicorp/nomad into f-ipv6-fingerprint
2017-04-07 18:37:19 -07:00
Diptanu Choudhury
bee4b57368
Removed redundant code
2017-04-07 18:28:22 -07:00
Alex Dadgar
f05c3fe233
Merge branch 'master' into f-ipv6-fingerprint
2017-04-07 17:11:24 -07:00
Diptanu Choudhury
ad00ec861b
Ignoring link local addresses
2017-04-07 16:04:36 -07:00
Alex Dadgar
3a9763aac6
Merge pull request #2535 from clinta/docker-ip
...
Allow specifying container IP with docker driver
2017-04-07 12:59:12 -07:00
Clint Armstrong
5f4716b4ea
Allow specifying container IP with docker driver
2017-04-07 11:56:07 -04:00
Michael Schurter
df30a110fb
Create AssertUntil helper func
2017-04-06 17:05:09 -07:00
Diptanu Choudhury
94f9542a04
Finding the appropriate cidr block
2017-04-06 16:04:59 -07:00
Michael Schurter
985bde83d6
Improve test timings
...
1234ms was far longer than needed and not sleeping between iterations
was just mean.
2017-04-06 11:10:36 -07:00
Michael Schurter
11206c7c3e
Require TLS for server RPC when enabled
...
Fixes #2525
We used to be checking a RequireTLS field that was never set. Instead we
can just check the TLSConfig.EnableRPC field and require TLS if it's
enabled.
Added a few unfortunately slow integration tests to assert the intended
behavior of misconfigured RPC TLS.
Also disable a lot of noisy test logging when -v isn't specified.
2017-04-06 09:34:36 -07:00