Commit Graph

2046 Commits

Author SHA1 Message Date
Michael Schurter
b048c9eefb Fix java tests 2017-01-20 14:12:30 -08:00
Michael Schurter
e79ef1135e Merge pull request #2216 from hashicorp/b-rootless-raw-exec
Don't link shared alloc dir into task dir for raw_exec
2017-01-20 13:18:54 -08:00
Michael Schurter
ef154fa449 Merge pull request #2215 from hashicorp/b-2211-host-env
Fix image based drivers having host env vars set
2017-01-20 13:16:44 -08:00
Michael Schurter
76d2e0dada Merge pull request #2198 from hashicorp/b-rootless-docker
Stop trying to use mount for image based drivers
2017-01-20 13:03:56 -08:00
Michael Schurter
269b3c7e14 Merge pull request #2186 from hashicorp/f-driver-cleanup
Add Cleanup method to Driver interface
2017-01-20 13:02:14 -08:00
Michael Schurter
1a845561dd Rename Constructor -> Parameterized Job 2017-01-20 12:43:10 -08:00
Michael Schurter
783118b34d Update created resources before exiting cleanup 2017-01-19 16:48:23 -08:00
Michael Schurter
828151ea38 Exit early when cleanup succeeds 2017-01-19 15:07:01 -08:00
Michael Schurter
cf0157af89 Fix incorrect lock usage 2017-01-19 11:39:18 -08:00
Michael Schurter
c2ec30c47b Bump unknown resource to ERR 2017-01-19 09:48:07 -08:00
Diptanu Choudhury
49e6735227 Merge pull request #2159 from hashicorp/b-consul-config
Fixed merging consul config
2017-01-18 16:14:54 -08:00
Diptanu Choudhury
6d669fb48e Moved functions to helper from structs 2017-01-18 15:55:14 -08:00
Michael Schurter
b6cf2174d2 Don't link shared alloc dir into task dir for raw_exec
Fixes running raw_exec tasks when nomad isn't root.
2017-01-18 11:28:34 -08:00
Michael Schurter
17bdfaf9e7 Fix image based drivers having host env vars set
Add detailed tests for GetTaskEnv to avoid this issue happening again!

Fixes #2211
2017-01-18 10:27:03 -08:00
Michael Schurter
cf06204c82 Add CreatedResources.Remove and use it 2017-01-17 16:41:59 -08:00
Michael Schurter
9c012a71e0 Remove outdated comment 2017-01-17 16:23:29 -08:00
Michael Schurter
a17c3a9ded Updated CreatedResources as images are cleaned 2017-01-17 16:13:40 -08:00
Michael Schurter
17d9e8e189 Remove outdated comment 2017-01-17 16:05:21 -08:00
Michael Schurter
4dcba012f4 Return error from Prestart 2017-01-17 16:04:09 -08:00
Michael Schurter
8e82326c2f Prevent race between alloc runners
Block ar1's periodic syncing which could recreate the state file ar2 was
destroying.
2017-01-17 13:10:20 -08:00
Michael Schurter
b100293a06 Try to get test passing in Travis 2017-01-17 12:51:19 -08:00
Michael Schurter
1f35e97510 Use Image ID instead of Image Name 2017-01-13 16:53:58 -08:00
Michael Schurter
db096b23b5 Switch to use recoverable errors from Cleanup
TaskRunner handles retrying but Cleanup handles all of CreatedResources.
2017-01-13 16:46:08 -08:00
Alex Dadgar
9206446a8d Support setting class_path and class name.
This PR enhances the java driver to allow setting the class path and
class name to run. It also fixes an issue that would make the Java
driver attempt to chroot regardless of operating system (this never
effected a released version of Nomad).
2017-01-13 16:03:11 -08:00
Michael Schurter
0785109ae4 Stop trying to use mount for image based drivers
Fixes #2178 and allows using Docker and other image based drivers even
when nomad is run as a non-root user.

`client/allocdir` tests can be run as a non-root user to ensure this
behavior and tests that rely on root or non-root users properly detect
their effective user and skip instead of fail.
2017-01-13 13:04:12 -08:00
Michael Schurter
b82c69886d Add ID to output 2017-01-13 12:46:55 -08:00
Michael Schurter
1ec5c930a6 Return errors from cleanup and let TaskRunner retry 2017-01-12 17:21:54 -08:00
Diptanu Choudhury
a066d90313 Added executorconfig 2017-01-12 15:47:58 -08:00
Diptanu Choudhury
84137b02c5 Filter executor log messages 2017-01-12 11:54:19 -08:00
Michael Schurter
cace868288 Stop being so confusing 2017-01-12 11:17:35 -08:00
Michael Schurter
33c015bcc7 Add Cleanup method to Driver interface
Cleanup can be used for cleaning up resources created by drivers to run
a task. Initially the Docker driver is the only user (to remove
downloaded images).
2017-01-11 17:23:33 -08:00
Alex Dadgar
41f8972fb7 Merge pull request #2177 from hashicorp/b-blocking-getallocs
GetAllocs uses a blocking query
2017-01-11 13:24:32 -08:00
Alex Dadgar
23e84ecc12 Random wait 2017-01-11 13:24:23 -08:00
Cameron Davison
d4b8fc953a using new ctx instead of getting both params back 2017-01-10 16:54:01 -06:00
Cameron Davison
2d6e7e7b57 fixing typo in comment 2017-01-10 16:54:01 -06:00
Cameron Davison
e2a09752b5 add force_pull to docker driver 2017-01-10 16:54:01 -06:00
Alex Dadgar
aa5c03fe77 Merge pull request #2179 from hashicorp/b-panic
Fix nil dereference
2017-01-10 14:15:17 -08:00
Alex Dadgar
47d48bdaee Fix nil dereference 2017-01-10 14:14:58 -08:00
Michael Schurter
8b80c7d15a Merge pull request #2174 from hashicorp/b-fix-executor-test
Switch to a less timing dependent test command
2017-01-10 13:45:12 -08:00
Michael Schurter
1bb4806ab4 Fix missing value in test failure message 2017-01-10 13:39:05 -08:00
Alex Dadgar
6687d38e00 Merge pull request #2173 from hashicorp/b-stats
Don't retrieve Driver Stats if unsupported
2017-01-10 13:32:03 -08:00
Alex Dadgar
925622a851 GetAllocs uses a blocking query
This PR makes GetAllocs use a blocking query as well as adding a sanity
check to the clients watchAllocation code to ensure it gets the correct
allocations.

This PR fixes https://github.com/hashicorp/nomad/issues/2119 and
https://github.com/hashicorp/nomad/issues/2153.

The issue was that the client was talking to two different servers, one
to check which allocations to pull and the other to pull those
allocations.  However the latter call was not with a blocking query and
thus the client would not retreive the allocations it requested.

The logging has been improved to make the problem more clear as well.
2017-01-10 13:30:35 -08:00
Michael Schurter
34cc7a70ad Switch to a less timing dependent test command
`/usr/bin/yes` could produce output very quickly (100s of MBps on my
laptop) and therefore could cause log files to roll over.

A bash loop with a sleep avoids that issue. The test is slower but
should be much more resilient to the massive timing differences between
workstations and Travis.
2017-01-09 15:40:53 -08:00
Alex Dadgar
fa7db8cdd4 Don't retrieve Driver Stats if unsupported
This PR makes us only try to collect stats once if the Driver doesn't
support collecting stats.

Fixes https://github.com/hashicorp/nomad/issues/1986
2017-01-09 13:47:06 -08:00
Alex Dadgar
e3ed6219d9 Merge pull request #2164 from hashicorp/b-dispatch
Create Task directory structure in the Run method
2017-01-09 11:24:46 -08:00
Alex Dadgar
276e5ccbd2 Move to Run() 2017-01-08 13:55:12 -08:00
Alex Dadgar
b69ea1f65c Create task directory during Prestart() 2017-01-08 13:55:12 -08:00
Alex Dadgar
0641d8a3d1 Send Driver events to servers immediately
This PR causes driver events to be sent to the server immediately rather
than waiting for Prestart() to finish.
2017-01-08 13:54:43 -08:00
Alex Dadgar
8214cf08c9 Fix fingerprint tests 2017-01-08 13:53:27 -08:00
Diptanu Choudhury
863120cc1a Fixed namespacing for the cpu arch 2017-01-06 14:23:22 -08:00