Josh Soref
b405713969
spelling: resource
2018-03-11 18:51:03 +00:00
Josh Soref
0ef3e4229b
spelling: initialization
2018-03-11 18:18:37 +00:00
Josh Soref
3c42f3f067
spelling: conjunction
2018-03-11 17:48:37 +00:00
Alex Dadgar
a9e3a41407
Enable more linters
2017-09-26 15:26:33 -07:00
Michael Schurter
8a7df57227
Test driver network advertisement and checks
2017-06-21 17:19:08 -07:00
Michael Schurter
3fddb05fc8
Implement DriverNetwork and Service.AddressMode
...
Ideally DriverNetwork would be fully populated in Driver.Prestart, but
Docker doesn't assign the container's IP until you start the container.
However, it's important to setup the port env vars before calling
Driver.Start, so Prestart should populate that.
2017-06-21 17:19:08 -07:00
Michael Schurter
a96fb5dbb0
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
Michael Schurter
6db35013d2
Add PortMap to struct returned by Driver.Prestart
...
Moves env.Builder out of drivers entirely so one less thing to worry
about when implementing driver plugins.
2017-05-23 13:53:34 -07:00
Michael Schurter
ace00980a1
Refactor TaskEnvironment into Builder and TaskEnv
2017-05-23 13:53:33 -07:00
Michael Schurter
7dac668adf
Functional consul template env file support
2017-05-23 13:45:14 -07:00
Alex Dadgar
e47be9f771
Merge branch 'master' into f-bolt-db
2017-05-09 11:11:55 -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
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
Alex Dadgar
7614feddbd
boltDB database for client state
2017-05-01 14:50:34 -07:00
Michael Schurter
0e0845e94b
Use a DriverAbility to expose Exec functionality
2017-04-19 12:42:47 -07:00
Michael Schurter
63a8307255
Move ScriptExecutor to driver
2017-04-19 12:42:47 -07:00
Alex Dadgar
564367fa71
Proper reference counting through task restarts
...
This PR fixes an issue in which the reference count on a Docker image
would become inflated through task restarts.
2017-03-25 17:05:53 -07:00
Michael Schurter
2822dd760c
Handle createdResourcs=nil
...
Combined with b522c472fd this fixes #2256
Without these two commits in place upgrades to 0.5.3 panics.
2017-01-31 10:51:32 -08:00
Alex Dadgar
b522c472fd
Add nil guard
2017-01-31 09:19:59 -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
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
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
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
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
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
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
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
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
Michael Schurter
aaa70ab7b8
Append host env vars on every task env
2016-12-20 12:24:24 -08:00
Alex Dadgar
cb10b277eb
Use new combined meta data function in env
2016-12-16 10:45:09 -08:00
Michael Schurter
ee17940dfe
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
9b18008ccd
Agent
2016-11-01 10:39:15 -07:00
Alex Dadgar
008d91aa56
Advertise signalling abilities
2016-10-19 15:06:23 -07:00
Alex Dadgar
917c7e5085
Merge pull request #1801 from hashicorp/f-signals
...
Consul-template signal change mode
2016-10-18 11:23:47 -07:00
Michael Schurter
2ae0c85290
Add NOMAD_JOB_NAME to environment
2016-10-11 11:20:42 -07:00
Alex Dadgar
1a3585b572
Docker + Qemu
2016-10-10 11:47:04 -07:00
Alex Dadgar
ee67630889
Struct and parse
2016-09-21 11:31:09 -07:00
Alex Dadgar
bec6adb2ee
Vault token threaded
2016-09-14 13:30:01 -07:00
Alex Dadgar
4bae54741e
Secret dir materialized in alloc/task directory
2016-09-02 12:44:05 -07:00
Alex Dadgar
335cababe1
Revert "Introduce a Secret/ directory"
2016-09-01 17:23:15 -07:00
Alex Dadgar
7f18d94976
Merge pull request #1671 from hashicorp/f-secret-dir2
...
Introduce a Secret/ directory
2016-09-01 09:56:17 -07:00
Alex Dadgar
dfab22cd9f
environment variables
2016-08-31 13:56:11 -07:00
Michael Schurter
53d7dfb1b7
Remove unused embedded lock on ExecContext
2016-08-26 11:58:03 -07:00
Alex Dadgar
1a7df4e7d2
Allocation resources returned in a struct
2016-06-11 21:04:10 -07:00
Diptanu Choudhury
9a851a11ee
Added the PidStats method on the executor
2016-05-28 19:42:34 -07:00