Commit graph

291 commits

Author SHA1 Message Date
Chris Bednarski 72cd22347f Docker kill now exits with an error, as expected 2015-09-25 22:43:19 -07:00
Chris Bednarski 0c31a83783 Go native for docker API calls 2015-09-25 20:01:03 -07:00
Chris Bednarski 198159c5be Put that back! 2015-09-25 18:38:41 -07:00
Chris Bednarski a8c8fc2f96 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 efb7c409bb 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 6ca7c6680d Fix client init logging and test 2015-09-25 18:12:11 -07:00
Alex Dadgar 70a1a37f84 Small test cleanup 2015-09-25 17:55:29 -07:00
Chris Bednarski d8e492d950 Added a failing test case for multiple docker tags 2015-09-25 17:38:07 -07:00
Chris Bednarski aa3019780d Added docker test to spin up 3 containers at the same time 2015-09-25 17:35:33 -07:00
Chris Bednarski 32d260281f 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 5a76693bc6 Fix comments 2015-09-25 16:49:19 -07:00
Alex Dadgar 3cf6d014ef Log the alloc and state directory on Client Init() 2015-09-25 16:49:19 -07:00
Alex Dadgar 998a817a29 Use host file/dir permissions when embedding 2015-09-25 16:49:19 -07:00
Alex Dadgar 3534839367 Destroy allocdirs in task runner tests 2015-09-25 16:49:19 -07:00
Alex Dadgar 5928b950c5 Skip non-regular files in embedding and comment on the chrootEnv map 2015-09-25 16:49:19 -07:00
Alex Dadgar 530e2d3c6d Change allocdir variable name for clarity 2015-09-25 16:49:19 -07:00
Alex Dadgar 8d7ededad7 Windows shouldn't do anything on unmount 2015-09-25 16:49:19 -07:00
Alex Dadgar eb2f01fd94 Update CPU limit to be an int 2015-09-25 16:49:18 -07:00
Alex Dadgar fc2e9754a3 Only unmount once 2015-09-25 16:49:18 -07:00
Alex Dadgar 0f855e2088 Fix cgroup isolation 2015-09-25 16:49:18 -07:00
Alex Dadgar e594e6081b Fix embed non-existent test 2015-09-25 16:49:18 -07:00
Chris Bednarski ac70832eb3 Added errNoResources to executor package; return this when Limit is called with nil argument 2015-09-25 16:49:18 -07:00
Chris Bednarski b9dd4c40c5 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 3cea4288b9 Merge qemu test 2015-09-25 16:49:14 -07:00
Alex Dadgar 6725cbb3f5 Mount shared alloc dir, modified API and tests 2015-09-25 16:46:41 -07:00
Alex Dadgar 81ade0f5d3 Linux Embed and AllocDir unit tests 2015-09-25 16:46:41 -07:00
Alex Dadgar 6879e59494 Fix function header 2015-09-25 16:46:41 -07:00
Alex Dadgar c9cffb93f6 Embed interface 2015-09-25 16:46:41 -07:00
Alex Dadgar 72d892a518 Client init rebase 2015-09-25 16:46:41 -07:00
Alex Dadgar 2e8395c458 Changed file names so it builds correctly 2015-09-25 16:46:41 -07:00
Alex Dadgar 9d3e3c0704 AllocDirBuilder that creates the alloc directory structure 2015-09-25 16:46:41 -07:00
Armon Dadgar 5bc26c3f9d Merge pull request #101 from hashicorp/f-qemu-network-update
driver/qemu: Use Restricted Ports, additional port forwarding
2015-09-25 16:36:46 -07:00
Clint Shryock f1ede2f555 Fix bad copy-paste from refactoring 2015-09-25 08:36:46 -05:00
Ryan Uber 6f15160f5c client: support modifying the servers list 2015-09-24 20:16:47 -07:00
Chris Bednarski fce6a5f7c7 Merge pull request #108 from hashicorp/b-netmap-crash
Fix crash in task_runner tests
2015-09-24 16:27:54 -07:00
Chris Bednarski a589c056ea All the TestTaskRunner* tests want this 2015-09-24 16:00:36 -07:00
Chris Bednarski e6ac055c6c Initialize reserved ports 2015-09-24 15:55:41 -07:00
Chris Bednarski d2aa4fd53c Merge pull request #104 from hashicorp/f-docker-static-ports
Add static (reserved) ports for docker
2015-09-24 15:44:41 -07:00
Chris Bednarski f032e311d2 Missed a set of parens 2015-09-24 15:40:32 -07:00
Chris Bednarski c9482e1188 Initialize reserved ports in task_runner 2015-09-24 15:37:43 -07:00
Chris Bednarski 40ce6ece41 Get only one version of a docker container 2015-09-24 14:07:28 -07:00
Clint Shryock 4e6c795352 re-order the resources check and don't bail if no ports requested 2015-09-24 14:32:54 -05:00
Chris Bednarski 3fd3c2a913 Add test case for PopulateEnvironment 2015-09-24 00:17:33 -07:00
Chris Bednarski f8e8084c71 Rename containerConfigForTask to createContainer to mirror the docker api call; other helper functions will follow this convention too 2015-09-24 00:00:46 -07:00
Chris Bednarski a071bb6d59 Rename containerConfig to hostConfig since there are two types of container configs 2015-09-23 23:57:04 -07:00
Chris Bednarski 9ff0e88d33 Added static / reserved port allocations to docker 2015-09-23 23:45:34 -07:00
Clint Shryock e67d892ea3 driver/qemu: Setup multiple port forwards 2015-09-23 23:15:28 -05:00
Chris Bednarski 1978be24d0 Format as string instead of casting to string 2015-09-23 19:29:53 -07:00
Chris Bednarski e413c6f9d2 Support mapped ports and labelled ports for docker 2015-09-23 18:19:01 -07:00
Chris Bednarski 1654d08fca Add docker ports; change to uppercase examples and tests 2015-09-23 18:01:08 -07:00
Chris Bednarski 8b2f8efe70 Merge branch 'master' into f-port-configs 2015-09-23 15:31:00 -07:00
Chris Bednarski b8fd345128 Docs and remove uppercase since it's checked at the config parse step 2015-09-23 15:28:58 -07:00
Armon Dadgar 3bdae950c5 Merge pull request #97 from hashicorp/f-qemu-driver-docs
Basic Qemu docs
2015-09-23 14:37:56 -07:00
Armon Dadgar 8aa2c292a0 Merge pull request #77 from hashicorp/f-network-fingerprint
Network Fingerprinting
2015-09-23 14:36:29 -07:00
Clint 15477ce433 Merge pull request #95 from hashicorp/f-java-driver-docs
Add some basic docs for the Java Driver
2015-09-23 15:59:33 -05:00
Clint Shryock e2c1bfe19c Basic Qemu docs 2015-09-23 14:44:49 -05:00
Chris Bednarski 73c4c1f210 Changed fmt for CPU to integer 2015-09-23 12:19:46 -07:00
Clint Shryock 0db8ce12d4 Update Java docs on how Java is detected 2015-09-23 14:16:43 -05:00
Clint Shryock 491f2d927f clean up some log formatting 2015-09-23 14:09:55 -05:00
Clint Shryock b93518b509 start the Qemu docs 2015-09-23 13:58:42 -05:00
Chris Bednarski e2c324d098 Merge branch 'master' into f-port-configs 2015-09-23 11:57:12 -07:00
Chris Bednarski f4ad6e51dc Replaced List with Map 2015-09-23 11:56:36 -07:00
Armon Dadgar b213462cb4 Change CPU from float64 to int 2015-09-23 11:14:32 -07:00
Clint Shryock 8c0542a9af Refactor network fingerprinting to be generic, use build flags 2015-09-23 10:12:56 -05:00
Clint Shryock 61d695b7d4 prefix warn/error messages 2015-09-23 10:03:35 -05:00
Clint Shryock e4a8565f00 fix casing for ERR logs 2015-09-23 10:00:06 -05:00
Chris Bednarski e26dbf4850 Fix some printf tokens 2015-09-22 23:43:05 -07:00
Chris Bednarski 9067b2594f Added environment variables to docker 2015-09-22 23:12:24 -07:00
Chris Bednarski 8bf45688b6 Check for nils before accessing data 2015-09-22 23:11:55 -07:00
Chris Bednarski 27376dc548 Added environment variables to Java 2015-09-22 22:36:10 -07:00
Chris Bednarski 3e90379f05 Pass dynamic ports to the exec driver via environment variables 2015-09-22 22:33:29 -07:00
Armon Dadgar fe72c8ea59 client: reset response struct to avoid decode errors 2015-09-22 22:10:28 -07:00
Armon Dadgar b7f370ba07 client: create dir, handle not exist more gracefully 2015-09-22 22:00:24 -07:00
Clint Shryock c84d51a9d1 don't re-convert mbits 2015-09-22 23:57:24 -05:00
Clint Shryock f876ed6673 refactoring, docs 2015-09-22 23:51:56 -05:00
Armon Dadgar ef81b29d7a client: fixing stats formating 2015-09-22 21:48:42 -07:00
Clint Shryock 088bc9e482 fix range error 2015-09-22 23:25:12 -05:00
Clint Shryock f60bbbfd15 populate node network resource 2015-09-22 23:22:23 -05:00
Clint Shryock e3c8ca8462 Update code for parsing IP address 2015-09-22 22:56:31 -05:00
Chris Bednarski 09249d877c Removed comment that's no longer relevant 2015-09-22 20:11:07 -07:00
Clint Shryock c615c560d2 Move ec2InstanceSpeed to a package variable, convert to string:int map 2015-09-22 22:04:20 -05:00
Alex Dadgar b8e7d28a06 Update package import name 2015-09-22 18:48:42 -07:00
Alex Dadgar dd2f16123f Fix qemu check and add debug lines when a driver is disabled 2015-09-22 17:36:44 -07:00
Alex Dadgar bbb3853dd8 Update Qemu Fingerprint check 2015-09-22 17:12:52 -07:00
Alex Dadgar e095664c49 Guard tests 2015-09-22 17:10:03 -07:00
Alex Dadgar 3875e8a59a Update exec_linux to assume it is running as root 2015-09-22 16:44:11 -07:00
Alex Dadgar dd0a76a9d7 Disable exec/java/qemu when non-root on non-windows OSes 2015-09-22 16:32:05 -07:00
Clint Shryock 5c749e1ffb Consolidate the AWS fingerprinters 2015-09-22 16:56:04 -05:00
Clint Shryock 2bbf080666 Refactor some AWS things, removing fingerprint/network.go
- move isAWS to env, use in other places
- fingerprint/network.go is no empty; removed
2015-09-22 16:31:57 -05:00
Clint Shryock b44c911996 change the naming 2015-09-22 16:01:29 -05:00
Chris Bednarski 168c959497 Added named ports 2015-09-22 13:59:16 -07:00
Clint Shryock a9cf7381ca Refactor the Network Fingerprinters 2015-09-22 15:59:00 -05:00
Clint Shryock f048326300 Rework client/fingerprint/fingerprint.go to use a slice and enforce ordering 2015-09-22 14:23:48 -05:00
Armon Dadgar ed2fc3a69f client: persist the node ID 2015-09-22 10:31:47 -07:00
Clint Shryock d11bd582f7 Basic network fingerprinting for Unix type, AWS systems 2015-09-22 11:44:53 -05:00
Alex Dadgar 1b46cbff83 Fixed function comment 2015-09-21 09:08:57 -07:00
Alex Dadgar 8d24e5e532 Tests skip based on cgroups, not root 2015-09-21 09:08:57 -07:00
Alex Dadgar e694688527 Update UniversalExecutor to have string identifiers 2015-09-21 09:08:57 -07:00
Alex Dadgar 0e3f21b34f Linux executor with cgroup isolation support 2015-09-21 09:08:57 -07:00
Clint Shryock 61948802a8 executor/linux: Add UUID for the name, return error on failure to apply 2015-09-21 09:08:57 -07:00