Cameron Davison
7ccbd8a000
fixing typo in comment
2017-01-10 16:54:01 -06:00
Cameron Davison
88a462d5b9
add force_pull to docker driver
2017-01-10 16:54:01 -06:00
Michael Schurter
0b7f8163d2
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
1347a941b0
Fix missing value in test failure message
2017-01-10 13:39:05 -08:00
Michael Schurter
7462379086
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
2be221d664
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
Michael Schurter
65fb580216
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
d3270799f0
Fix executor tests
2017-01-06 11:39:18 -08:00
Michael Schurter
e203928d64
Driver is now required in test tasks
2017-01-06 11:39:17 -08:00
Michael Schurter
579f378bee
Remove debug logging
2017-01-05 16:31:56 -08:00
Michael Schurter
baf6f078d6
Remove task name prefix from executor logs
2017-01-05 16:31:56 -08:00
Michael Schurter
86fcf96f72
Put a logger in AllocDir/TaskDir
2017-01-05 16:31:56 -08:00
Michael Schurter
7260d0bca3
Test tasks now require driver name
2017-01-05 16:31:55 -08:00
Michael Schurter
3ea09ba16a
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
8d5f0fea69
Merge pull request #2128 from hashicorp/f-dispatch
...
Nomad Constructor Jobs and Dispatch
2017-01-06 05:22:49 +08:00
Michael Schurter
4a9a574d9d
Merge pull request #2054 from hashicorp/f-prestart
...
Add Driver.Prestart method
2016-12-20 16:18:56 -08:00
Michael Schurter
8e1ae14feb
Remove unneeded env building
2016-12-20 16:14:42 -08:00
Michael Schurter
39f587a2af
Fix tests broken by TaskEnv change
2016-12-20 14:37:35 -08:00
Michael Schurter
0d90e96925
lxc: Set image local env vars
2016-12-20 14:37:18 -08:00
Michael Schurter
05b49008eb
Remove unneeded waitClient field
2016-12-20 14:29:57 -08:00
Michael Schurter
ea92cd102a
Append host env vars on every task env
2016-12-20 12:24:24 -08:00
Michael Schurter
458c2ed5f1
Fix formatting of downloading image message
2016-12-20 11:57:26 -08:00
Michael Schurter
e34d1e5d23
Use startContainer wrapper
2016-12-20 11:55:40 -08:00
Michael Schurter
85b0cecff2
Emit "Downloading image" event
2016-12-20 11:40:34 -08:00
Alex Dadgar
746d4c7ee3
Small cleanups
2016-12-19 14:22:08 -08:00
Alex Dadgar
18739a4433
Merge pull request #1980 from dmexe/network-aliases
...
Add network_aliases for docker driver
2016-12-19 14:17:48 -08:00
Alex Dadgar
7cdf24f05f
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
2f3aeed2f8
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
Alex Dadgar
4e8035756b
Fix test and prevent job with payload from being submitted
2016-12-18 16:32:14 -08:00
Alex Dadgar
b1883daae8
Use new combined meta data function in env
2016-12-16 10:45:09 -08:00
Alex Dadgar
7778339f03
Fix mapstructure tag formatting for lxc driver
2016-12-16 10:24:17 -08:00
Tom Michaud
d0c01c8816
Fixes docker-driver Auth-config interpolation
2016-12-06 13:30:23 -07:00
Michael Schurter
770ed703d0
Add Driver.Prestart method
...
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.
Currently Prestart does two things:
* Any driver specific task environment building
* Download Docker images
This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08:00
Alex Dadgar
70396c464b
Make errors starting a container recoverable
...
This PR makes errors starting a container recoverable and tries to
optimistically handle 500 errors.
2016-11-30 15:59:47 -08:00
Diptanu Choudhury
6c179d1695
Merge pull request #2045 from hashicorp/b-docker-create-container
...
Returning a container if it exists instead of creating a new one
2016-11-29 17:55:33 -08:00
Diptanu Choudhury
50452520bf
Returning a container if it exists instead of creating a new one
2016-11-29 17:52:19 -08:00
Alex Dadgar
712e18707b
add debugging
2016-11-29 14:29:37 -08:00
Diptanu Choudhury
bff172939b
Fixes an issue with purging containers with the same name Nomad is trying to start
2016-11-28 17:37:22 -08:00
Michael Schurter
1f0bfa00aa
rkt: Support host and none dns options
...
Fixes #2025
2016-11-28 13:13:40 -08:00
Michael Schurter
44e4414490
Fix rkt volumes
...
I forgot to validate the volumes field!
2016-11-28 13:13:40 -08:00
Alex Dadgar
4f2a6eae8b
Merge pull request #2029 from gliptak/dockerauth1
...
Log when lookup in docker.auth.config fails
2016-11-28 12:45:19 -08:00
Alex Dadgar
d8048ad75d
Merge pull request #2033 from hashicorp/b-docker-container-exists
...
Make container exist errors non-retriable
2016-11-28 12:38:52 -08:00
Michael Schurter
b3ede6a5b7
Use net.JoinHostPort instead of fmt.Sprintf
...
Using fmt.Sprintf breaks IPv6 addresses.
2016-11-28 10:38:54 -08:00
Alex Dadgar
8a641a8672
Make container exist errors non-retriable
...
This change makes it so that the task runner does not retry container
exists errors and also a sleep is added on the local retry.
2016-11-25 19:22:58 -08:00
Gábor Lipták
6268112e86
Log when lookup in docker.auth.config fails
2016-11-23 18:43:58 -05:00
Ranjib Dey
0b29ad8787
Fix error message. Pass on template args
2016-11-21 20:12:59 -08:00
Dmitry Galinsky
3ec7ebac9c
Add network_aliases for docker driver
2016-11-16 11:16:07 +03:00
Alex Dadgar
3e5bfcdbc4
respond to comment
2016-11-15 16:27:07 -08:00
Alex Dadgar
cb187ffce6
Fix TestRktDriver_PortsMapping and TestAgent_LoadKeyrings
2016-11-15 15:49:05 -08:00
Alex Dadgar
a11d66f639
Remove todo
2016-11-10 15:20:19 -08:00