Commit Graph

260 Commits

Author SHA1 Message Date
Mitchell Hashimoto
950fc7e495 client: fix windows build errors 2015-09-27 23:53:25 -07:00
Armon Dadgar
d054a06dc4 docker: check for missing unix socket 2015-09-27 17:49:58 -07:00
Alex Dadgar
90c2281a4e Better Sprintf 2015-09-27 17:41:43 -07:00
Alex Dadgar
6f8f5b164d Add environment package 2015-09-27 17:37:25 -07:00
Alex Dadgar
be406ea5d4 Fix args in test 2015-09-27 17:37:24 -07:00
Alex Dadgar
6d8a913242 ParseAndReplace args at the executor level 2015-09-27 17:37:24 -07:00
Alex Dadgar
17b2fb4600 Check err 2015-09-27 17:37:24 -07:00
Alex Dadgar
64ac893eb1 Set the allocdir correctly when using the linux executor 2015-09-27 17:37:24 -07:00
Alex Dadgar
75f93ce9fb Pull task environments into their own type to be reusable across drivers and executors 2015-09-27 17:37:24 -07:00
Alex Dadgar
148e415f43 Remove cruft from rebase 2015-09-27 17:37:24 -07:00
Alex Dadgar
c555c70eeb merge fixes 2015-09-27 17:37:24 -07:00
Chris Bednarski
bc3504a7d0 Correct implementation of config check for container and image cleanup; moved into Start and Open because handle does not have the config object 2015-09-27 13:59:38 -07:00
Chris Bednarski
24c5fc9cc5 Merge branch 'master' into f-docker-config-cleanup 2015-09-26 21:52:02 -07:00
Chris Bednarski
51bf0162d0 Add configuration option for whether Nomad will clean up containers and images when they are no longer used 2015-09-26 18:53:15 -07:00
Chris Bednarski
bb9fbf8f22 Add all containers when searching for images that are still in used, since the container using the image may be stopped 2015-09-26 18:51:36 -07:00
Chris Bednarski
b0c1b04264 Log an info when an image can't be removed because it's still in use 2015-09-26 00:34:57 -07:00
Chris Bednarski
30fd526766 Use env.Get, remove sha256 checks, and change from regexp to strconv to test for int 2015-09-25 23:55:01 -07:00
Chris Bednarski
5d4d044a6f Add docker 'command' to docs; cleanup some comments 2015-09-25 23:28:23 -07:00
Chris Bednarski
928fe86553 Replace docker version and docker ps with native calls; no more exec! 2015-09-25 23:13:40 -07:00
Chris Bednarski
6c5ddb3076 Docker kill now exits with an error, as expected 2015-09-25 22:43:19 -07:00
Chris Bednarski
784d0e9e15 Go native for docker API calls 2015-09-25 20:01:03 -07:00
Chris Bednarski
6882f20b9f Put that back! 2015-09-25 18:38:41 -07:00
Chris Bednarski
723b55c049 Merge branch 'master' into b-docker-fixes
Conflicts:
	client/driver/docker_test.go
	client/driver/java_test.go
	client/driver/qemu_test.go
2015-09-25 18:35:23 -07:00
Chris Bednarski
cf0440dbe3 Improve handling of tagged docker images
- Converted Start() to use docker native client throughout
- Better handling of latest vs. tagged images
    - We can now support multiple versions of an image
    - We will now not download a tag if we already have it
2015-09-25 18:22:10 -07:00
Alex Dadgar
3906dc1afc Fix client init logging and test 2015-09-25 18:12:11 -07:00
Alex Dadgar
04094cfb40 Small test cleanup 2015-09-25 17:55:29 -07:00
Chris Bednarski
0f6e60c7aa Added a failing test case for multiple docker tags 2015-09-25 17:38:07 -07:00
Chris Bednarski
6b59a8235e Added docker test to spin up 3 containers at the same time 2015-09-25 17:35:33 -07:00
Chris Bednarski
f2dd5cac18 Added guards to tests so we can more gracefully degrade the test suite when thing are not installed 2015-09-25 16:49:26 -07:00
Alex Dadgar
57ade13fc8 Fix comments 2015-09-25 16:49:19 -07:00
Alex Dadgar
df8103dfe9 Log the alloc and state directory on Client Init() 2015-09-25 16:49:19 -07:00
Alex Dadgar
2ee8b22ddb Use host file/dir permissions when embedding 2015-09-25 16:49:19 -07:00
Alex Dadgar
0dd0bf39fa Destroy allocdirs in task runner tests 2015-09-25 16:49:19 -07:00
Alex Dadgar
6d7afcd1ff Skip non-regular files in embedding and comment on the chrootEnv map 2015-09-25 16:49:19 -07:00
Alex Dadgar
66fd821af5 Change allocdir variable name for clarity 2015-09-25 16:49:19 -07:00
Alex Dadgar
23c726a055 Windows shouldn't do anything on unmount 2015-09-25 16:49:19 -07:00
Alex Dadgar
84e6601db8 Update CPU limit to be an int 2015-09-25 16:49:18 -07:00
Alex Dadgar
e5eb55c805 Only unmount once 2015-09-25 16:49:18 -07:00
Alex Dadgar
099e9de211 Fix cgroup isolation 2015-09-25 16:49:18 -07:00
Alex Dadgar
e8bd1a3df4 Fix embed non-existent test 2015-09-25 16:49:18 -07:00
Chris Bednarski
5c4bb5d53e Added errNoResources to executor package; return this when Limit is called with nil argument 2015-09-25 16:49:18 -07:00
Chris Bednarski
559462b49f Added basic resources to exec/java tests so each test has cpu, ram, and network 2015-09-25 16:49:18 -07:00
Alex Dadgar
8a5e65e27a Merge qemu test 2015-09-25 16:49:14 -07:00
Alex Dadgar
9caa7ac077 Mount shared alloc dir, modified API and tests 2015-09-25 16:46:41 -07:00
Alex Dadgar
aba801d68e Linux Embed and AllocDir unit tests 2015-09-25 16:46:41 -07:00
Alex Dadgar
7a5f6ea8e8 Fix function header 2015-09-25 16:46:41 -07:00
Alex Dadgar
a934701857 Embed interface 2015-09-25 16:46:41 -07:00
Alex Dadgar
dfd0efbacd Client init rebase 2015-09-25 16:46:41 -07:00
Alex Dadgar
66fe1294da Changed file names so it builds correctly 2015-09-25 16:46:41 -07:00
Alex Dadgar
38460ca653 AllocDirBuilder that creates the alloc directory structure 2015-09-25 16:46:41 -07:00