Alex Dadgar
47d48bdaee
Fix nil dereference
2017-01-10 14:14:58 -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
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
Michael Schurter
a087a8be79
Fix inconsistent task env setting
...
Consolidate task environment building in GetTaskEnv since it can
determine what kind of filesystem isolation is used.
This means drivers no longer have to manipulate task environment paths.
2017-01-06 12:19:32 -08:00
Michael Schurter
ed8b3cd37d
Fix executor tests
2017-01-06 11:39:18 -08:00
Michael Schurter
9bfa8dc2bd
Add COMPAT comment
2017-01-06 11:39:17 -08:00
Michael Schurter
59c501f474
Driver is now required in test tasks
2017-01-06 11:39:17 -08:00
Michael Schurter
6235122b55
Fix tests post rebase
2017-01-06 11:39:13 -08:00
Michael Schurter
12915c30bf
Remove debug logging
2017-01-05 16:31:56 -08:00
Michael Schurter
86db19407e
Remove task name prefix from executor logs
2017-01-05 16:31:56 -08:00
Michael Schurter
e25274b775
Put a logger in AllocDir/TaskDir
2017-01-05 16:31:56 -08:00
Michael Schurter
957adf2df3
Add comments to TaskDir
2017-01-05 16:31:55 -08:00
Michael Schurter
3011df1c89
Fix upgrade path for #2132
...
AllocRunner's state dropped the Context struct which needs to be
converted to the new AllocDir+TaskDir structs in RestoreState.
TaskRunner added a TaskDirBuilt flag, but it's safe to just let that
default to `false` and rebuild all task dirs once on upgrade.
2017-01-05 16:31:55 -08:00
Michael Schurter
d87dcce722
Fail fast on taskdir errors
2017-01-05 16:31:55 -08:00
Michael Schurter
e7f6986eb2
Test tasks now require driver name
2017-01-05 16:31:55 -08:00
Michael Schurter
de7351b959
Move chroot building into TaskRunner
...
* Refactor AllocDir to have a TaskDir struct per task.
* Drivers expose filesystem isolation preference
* Fix lxc mounting of `secrets/`
2017-01-05 16:31:49 -08:00
Alex Dadgar
248c069652
Merge pull request #2128 from hashicorp/f-dispatch
...
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Alex Dadgar
9a3447d577
Merge pull request #2157 from hashicorp/t-client-tests
...
Fix client tests deadlocking
2017-01-06 05:21:05 +08:00
Alex Dadgar
bfc1d9c45f
use helper
2017-01-05 13:19:01 -08:00
Diptanu Choudhury
5c6adce720
Unlocking if we return before adding a new alloc runner
2017-01-05 13:18:48 -08:00
Alex Dadgar
de832069eb
Fix TestClient_BlockedAllocations
2017-01-05 13:15:08 -08:00
Diptanu Choudhury
84bbd3de28
Fixed how alloc lock is held
2017-01-05 13:06:56 -08:00
Alex Dadgar
a44f7266c2
Fix SaveRestoreState
2017-01-05 12:32:44 -08:00
Michael Schurter
09d4f0795a
Fix race when shutting down in dev mode
...
Client.Shutdown holds the allocLock when destroying alloc runners in dev
mode.
Client.updateAllocStatus can be called during AllocRunner shutdown and
calls getAllocRunners which tries to acquire allocLock.RLock. This
deadlocks since Client.Shutdown already has the write lock.
Switching Client.Shutdown to use getAllocRunners and not hold a lock
during AllocRunner shutdown is the solution.
2017-01-03 17:21:50 -08:00
Michael Schurter
fccf115c56
Merge pull request #2054 from hashicorp/f-prestart
...
Add Driver.Prestart method
2016-12-20 16:18:56 -08:00
Michael Schurter
904543ef1b
Remove unneeded env building
2016-12-20 16:14:42 -08:00
Michael Schurter
decee19978
Fix tests broken by TaskEnv change
2016-12-20 14:37:35 -08:00
Michael Schurter
630812bbdd
lxc: Set image local env vars
2016-12-20 14:37:18 -08:00
Michael Schurter
5ad7eeaed5
Remove unneeded waitClient field
2016-12-20 14:29:57 -08:00
Michael Schurter
aaa70ab7b8
Append host env vars on every task env
2016-12-20 12:24:24 -08:00
Michael Schurter
6702813233
Fix formatting of downloading image message
2016-12-20 11:57:26 -08:00
Michael Schurter
bbcc27ef1b
Use startContainer wrapper
2016-12-20 11:55:40 -08:00
Diptanu Choudhury
9903a8c6df
Fixed a test
2016-12-20 11:53:37 -08:00
Michael Schurter
750d59773c
Rename InitializationMessage to DriverMessage
2016-12-20 11:51:09 -08:00
Michael Schurter
50934da2c4
Emit "Downloading image" event
2016-12-20 11:40:34 -08:00
Diptanu Choudhury
dabb8de14e
Merge pull request #2081 from hashicorp/f-gc
...
Garbage collector for allocations
2016-12-20 11:19:32 -08:00
Diptanu Choudhury
6f978dd051
Removing the alloc runner from GC if it is destroyed by the server
2016-12-20 11:14:22 -08:00
Diptanu Choudhury
7ebe4a6972
Added comments
2016-12-20 10:49:48 -08:00
Alex Dadgar
e420d17bfb
Small cleanups
2016-12-19 14:22:08 -08:00
Alex Dadgar
feb6f53a53
Merge pull request #1980 from dmexe/network-aliases
...
Add network_aliases for docker driver
2016-12-19 14:17:48 -08:00
Alex Dadgar
f36ccccdc2
Fix Docker Logging Type interpolation
...
This PR fixes an issue that made Logging.Type un-interpretable in the
docker driver.
2016-12-19 13:42:58 -08:00
Alex Dadgar
a51adaf609
Merge pull request #2063 from tmichaud314/fix-docker-driver-auth-interpolation
...
Fixes docker-driver Auth-config interpolation
2016-12-19 13:41:27 -08:00
Diptanu Choudhury
6143d8dbbd
Added tests
2016-12-19 13:21:47 -08:00
Alex Dadgar
c2cb2cc11f
Fix test and prevent job with payload from being submitted
2016-12-18 16:32:14 -08:00