Alex Dadgar
1ceb6f012a
Fix a bunch of tests
...
Up timeouts
trusty travis beta
Increase timeouts
2016-01-20 16:03:53 -08:00
Diptanu Choudhury
6b9dcd06c6
Renaming a test
2016-01-20 15:55:41 -08:00
Diptanu Choudhury
87eef5cd3f
Changing the logic of purging old rotated files
2016-01-20 15:53:17 -08:00
Diptanu Choudhury
46f09dd1f1
Added some comments
2016-01-20 14:14:37 -08:00
Alex Dadgar
9f5ccee7ff
Fix docker tests
2016-01-19 15:35:01 -08:00
Diptanu Choudhury
d3734a47cd
stating an existing file only once
2016-01-16 20:09:24 -08:00
Diptanu Choudhury
4122aeedc8
Added a comment for bufsize
2016-01-16 19:21:16 -08:00
Diptanu Choudhury
6e069369fe
Implemented a method to purge files
2016-01-16 19:19:52 -08:00
Diptanu Choudhury
c3fd960485
Fixing tests
2016-01-15 11:18:02 -08:00
Diptanu Choudhury
2bfdd71db9
add a logger
2016-01-14 23:16:30 -08:00
Diptanu Choudhury
3fb21b1b40
excluding directories before opening file for writing
2016-01-14 23:05:45 -08:00
Diptanu Choudhury
385fe065ec
Added a test for testing if logrotator creates an empty dir when it starts from scratch
2016-01-14 22:43:52 -08:00
Diptanu Choudhury
5835d0e436
Fixed the logic of rotating files
2016-01-14 22:36:55 -08:00
Diptanu Choudhury
97dca83866
Fixed the test for writing only N amount of bytes as much as capacity
2016-01-14 18:30:53 -08:00
Diptanu Choudhury
b474810134
Added a test for file rotation
2016-01-14 11:41:31 -08:00
Diptanu Choudhury
9749ee301d
Added an impl for log-rotator
2016-01-14 11:13:11 -08:00
Alex Dadgar
6d157a0337
Fix tests
2016-01-11 09:58:31 -08:00
Alex Dadgar
7fe6c8bd1b
Add folder
2016-01-11 09:58:31 -08:00
Alex Dadgar
3ba1c9b76b
merge
2016-01-11 09:58:26 -08:00
Bastiaan Bakker
fcfa8373b2
Add options ipc_mode, pid_mode and uts_mode to docker driver.
...
May only be used if priviliged mode is enabled in driver config.
2016-01-08 23:34:49 +01:00
Alex Dadgar
ef36ae0168
Use basic executor
2016-01-06 15:31:08 -08:00
Diptanu Choudhury
161f90abc6
Adding a , between args to netdav
2016-01-05 13:17:51 -08:00
Alex Dadgar
198230bae9
Merge pull request #645 from achanda/mount_dirs
...
Mount task and alloc dirs in the rkt driver
2016-01-05 10:34:03 -08:00
Abhishek Chanda
2fc6352076
Mount task and alloc dirs in the rkt driver
...
rkt docs herer https://coreos.com/rkt/docs/latest/subcommands/run.html#mounting-volumes
2016-01-05 10:27:44 +00:00
Alex Dadgar
1e5c776e40
Merge pull request #624 from hashicorp/f-adjustable-timeout
...
User specifiable kill timeout and operator configurable max
2016-01-04 11:44:22 -08:00
Alex Dadgar
813d3545e3
Merge pull request #633 from achanda/opts_change
...
Update the insecure flag
2015-12-28 13:35:36 -08:00
Kenneth Feng
a85b2c0e90
linux/exec: add /usr/share to ChrootEnv
2015-12-28 13:39:34 -05:00
Abhishek Chanda
60fe5e19e8
Update the insecure flag
...
The current call has been deprecated in
https://github.com/coreos/rkt/pull/1738
2015-12-25 15:59:54 +00:00
Alex Dadgar
ddf392c6be
User specifiable kill timeout and operator configurable max
2015-12-22 16:10:30 -08:00
Abhishek Chanda
a347cda6e3
Consolidate if else conditions
2015-12-22 18:23:29 +00:00
Alex Dadgar
29411d698a
Rkt comment and variable name update
2015-12-22 10:11:22 -08:00
Abhishek Chanda
74a5292789
Move constants to the top
2015-12-22 05:15:37 +00:00
Abhishek Chanda
0918a38221
Do not allow rkt version less than 0.14.0
2015-12-21 17:48:21 +00:00
Abhishek Chanda
1c4e380868
Use camelCase for variable names
2015-12-21 16:37:21 +00:00
Abhishek Chanda
3d2589e797
Run gofmt
2015-12-21 06:09:11 +00:00
Abhishek Chanda
b843b1a853
Support CPU and meory isolators for the rkt driver
...
The rkt community added supprt for these isolators recently
2015-12-21 06:06:45 +00:00
Clint Shryock
77b5639160
Executors/Linux: Update Executor config struct
2015-12-17 10:25:42 -06:00
Diptanu Choudhury
f6fb42835e
Using cgo dependencies to look up users
2015-12-15 11:12:13 -08:00
Alex Dadgar
b943c6e278
Remove all calls to the default logger
2015-12-11 15:02:13 -08:00
Chris Hines
5f5f91717d
Avoid leaking a time.Ticker.
2015-12-11 15:30:53 -05:00
Alex Dadgar
0a950a4070
Merge pull request #556 from hashicorp/b-cache-docker-client
...
Do.Once docker client initialization
2015-12-10 16:19:06 -08:00
Chris Bednarski
545f0ff120
Move raw_exec enabled into the DevMode config block
2015-12-10 15:24:21 -08:00
Chris Bednarski
36e828ea9a
Use ReadBoolDefault
2015-12-10 15:03:25 -08:00
Chris Bednarski
65d4aa889b
Enable raw exec in dev mode
2015-12-10 14:48:06 -08:00
Alex Dadgar
5eeec26102
Do Once docker client initialization
2015-12-10 13:49:29 -08:00
Diptanu Choudhury
de06482506
Sending the user process sigint during shutdown on linux
2015-12-08 08:14:13 -08:00
Chris Bednarski
9292a97062
Merge branch 'user-lookup-nocgo' of https://github.com/carlosdp/nomad into b-user-lookup
2015-12-01 13:44:56 -08:00
Carlos Diaz-Padron
55e49506f0
Refactor out userLookup to helper package
...
Also replaces user.Lookup in exec driver
2015-12-01 11:59:55 -08:00
Diptanu Choudhury
29915ddd16
Moving the args to helper
2015-11-26 14:13:19 -08:00
Chris Hines
37745f66c9
Speed up tests by allowing parallel execution.
2015-11-25 15:56:55 -05:00
Chris Hines
5b2168bb12
Use package testtask and httptest.Server to make client/driver tests OS independent.
2015-11-25 15:56:20 -05:00
Chris Hines
e569fb4787
Use package testtask in client/driver/spawn tests.
2015-11-25 15:34:55 -05:00
Chris Hines
46e848c8ec
Eliminate special case in production code for embedding test binary into chroot.
2015-11-25 15:31:29 -05:00
Chris Hines
d7ebe099c1
Factor portable test task out of client/driver/executor.
2015-11-24 20:59:42 -05:00
Alex Dadgar
c7cd7abe22
Inject the current binary into the chroot in test mode
2015-11-24 16:30:53 -08:00
Chris Hines
ea5a60629a
Fix Executor_Open_Invalid test for Windows.
2015-11-24 16:30:53 -08:00
Chris Hines
cb262d787f
Include Executor_Open_Invalid in test suite.
2015-11-24 16:30:53 -08:00
Chris Hines
769415dbd2
Improve names and documentation in test code.
2015-11-24 16:30:53 -08:00
Chris Hines
ec7e78680d
Use TestMain to provide portable echo, sleep, and write commands.
2015-11-24 16:30:53 -08:00
Alex Dadgar
b2daa5e2e6
Standardize log messages in fingerprinters to DEBUG
2015-11-24 11:06:51 -08:00
Chris Bednarski
3ed8cb5b8b
Merge pull request #481 from hashicorp/b-vet
...
Fix some issues caught by go vet
2015-11-20 16:31:47 -08:00
Chris Bednarski
e6daf57b10
Merge pull request #480 from hashicorp/f-docker-tls-config
...
Added docker.tls config file options and docs
2015-11-20 16:31:41 -08:00
Chris Bednarski
655a4bf334
Fix some issues caught by go vet
2015-11-20 16:01:27 -08:00
Chris Bednarski
719c345164
Change println to printf
2015-11-20 16:00:58 -08:00
Chris Bednarski
8169c8e185
Don't show endpoint when we're not using it
2015-11-20 15:53:38 -08:00
Chris Bednarski
4063b6583e
Added docker.tls config file options and docs
2015-11-20 15:47:03 -08:00
Alex Dadgar
34b2f62c0b
Merge pull request #442 from ChrisHines/windows-spawn
...
Fix tests for nomad/client/driver/spawn package to work on Windows.
2015-11-20 14:49:54 -08:00
Chris Bednarski
10bb550ad8
Added client checks back to the tests that can't use dockerSetup()
2015-11-20 13:50:47 -08:00
Chris Bednarski
cf4bb4cfd0
Squash []map[string]type for port_map and labels into map[string]type
2015-11-19 21:29:37 -08:00
Chris Bednarski
275550dcd3
Fixed some issues with expose, port mapping, and environment variables
...
- Port mapping now works for reserved ports as well as dynamic ports
- Environment variables were being set twice in two different ways; now they are only set once
- Comprehensive tests for exposed ports, forwarded ports, and environment variables
- Cleaned up / DRYed up a lot of test code
2015-11-19 19:08:21 -08:00
Chris Bednarski
b9b786732e
Export DockerHandle and change tests to use DockerHandle.ContainerID()
2015-11-19 14:20:41 -08:00
Chris Bednarski
6253b1d0aa
Add ContainerID() method to get the containerID from a handle
2015-11-19 13:57:18 -08:00
Antonio Fernández
581245f881
fix docker port allocation?
2015-11-19 19:15:25 +01:00
Chris Hines
3a77952d59
Handle additional edge cases when parsing environment variables.
2015-11-18 21:21:07 -05:00
Alex Dadgar
4d817f5cbc
Revert "Revert "Make drivers take arguments as a list and not as a string""
2015-11-18 15:16:42 -08:00
Alex Dadgar
0e51375285
Revert "Make drivers take arguments as a list and not as a string"
2015-11-18 13:46:43 -08:00
Alex Dadgar
6574fd27e3
Remove returning the error
2015-11-18 12:40:34 -08:00
Alex Dadgar
5a678548fa
Rebase
2015-11-18 12:30:35 -08:00
Alex Dadgar
c04e2b8b8e
Fix executor tests
2015-11-18 12:29:04 -08:00
Alex Dadgar
54ddf4d3c1
Rebase
2015-11-18 12:29:04 -08:00
Alex Dadgar
7b918ee1e7
Update ParseAndReplace to take a list of args and remove shell style parsing
2015-11-18 12:29:04 -08:00
Chris Hines
713d63e467
Move test code to *_test.go file.
2015-11-18 14:46:56 -05:00
Chris Bednarski
fc69721cc7
Added missing %s to error format string
2015-11-18 11:29:49 -08:00
Chris Bednarski
e17f5984ef
Revert "Added missing %s to error format string"
...
This reverts commit f4acdfd035c2ffa196035cc574d8b40a1795abb3.
2015-11-18 11:28:38 -08:00
Chris Bednarski
7a077a29b5
Added missing %s to error format string
2015-11-18 11:28:07 -08:00
Chris Bednarski
b9fcdc400a
Merge branch 'master' into f-docker-dns-config
2015-11-18 10:31:06 -08:00
Carlos Diaz-Padron
4a6c3d773d
Nest Docker driver auth under object
2015-11-18 01:37:42 -08:00
Carlos Diaz-Padron
de6c06d332
De-nest docker registry auth and reformat related doc
2015-11-17 23:32:57 -08:00
Chris Bednarski
f4344092fb
Change DNS and DNSSearch to use lists; added a test
2015-11-17 22:02:23 -08:00
Chris Bednarski
c80cf651e8
Merge branch 'master' into f-docker-dns-config
2015-11-17 21:43:04 -08:00
Chris Bednarski
7b25c9b4d9
Change dns_servers and dns_search_domains from comma-delimited strings to lists
2015-11-17 21:41:00 -08:00
Chris Bednarski
6c1df52342
Merge pull request #439 from hashicorp/b-docker-ports-len
...
Fix docker port tests and empty port_map
2015-11-17 21:37:48 -08:00
Chris Bednarski
c851ae67c7
Change error check to contains instead of ==
2015-11-17 21:36:23 -08:00
Chris Bednarski
563e1aff56
Renamed some things so it's more apparent that reserved and dynamic port mapping have very similar code
2015-11-17 21:34:07 -08:00
Chris Bednarski
8705ea07a4
Remove \n since this is added by the logger
2015-11-17 21:17:51 -08:00
Alex Dadgar
2a8bd98fdc
Qemu driver takes a port_map to configure host to guest port forwarding
2015-11-17 20:54:53 -08:00
Chris Bednarski
5ac6664c46
Purge existing container during Start()
2015-11-17 20:50:14 -08:00
Chris Hines
af2c47460b
Speed up tests by allowing parallel execution.
2015-11-17 23:43:20 -05:00
Chris Hines
2120e9e10a
Move defer f.Close after error check.
2015-11-17 23:43:20 -05:00
Chris Hines
8e8eccee20
Use TestMain to provide portable echo and sleep commands.
2015-11-17 23:43:19 -05:00
Chris Hines
071018569d
Extract code to acquire temp file name and make sure the file is closed so os.Remove works on Windows.
2015-11-17 23:43:18 -05:00
Chris Bednarski
0e1fe2373a
Log container name and labels
2015-11-17 20:04:10 -08:00
Chris Bednarski
640af994ca
Added a randomized alloc id for tests so container names don't collide
2015-11-17 19:45:33 -08:00
Chris Bednarski
9a7adb9eb3
Fix guards for docker port mapping and change dummy dynamic ports to real ports (0 is not a valid port)
2015-11-17 19:21:36 -08:00
Alex Dadgar
45bb0d349c
Update API docs
2015-11-17 19:12:19 -08:00
Chris Bednarski
d098acef90
Fix guard for port maps not being specified
2015-11-17 18:16:01 -08:00
Chris Bednarski
122220a424
Merge branch 'master' into f-docker-any-network
2015-11-17 17:22:13 -08:00
Chris Bednarski
9cad290b18
Merge pull request #436 from hashicorp/f-docker-cleanup
...
Cleanup docker driver
2015-11-17 17:13:17 -08:00
Chris Bednarski
b22b5eb3aa
Inline err assignment
2015-11-17 17:12:45 -08:00
Chris Bednarski
a2f4188246
Streamline reading boolean values from the driver / job config
2015-11-17 16:58:23 -08:00
Chris Bednarski
67ee502acb
Added missing linebreaks for log.Printf calls
2015-11-17 16:49:01 -08:00
Chris Bednarski
43aaf94383
Do Itoa once so line items are simpler
2015-11-17 16:31:47 -08:00
Chris Bednarski
ffd3f114dd
Merge branch 'docker-allow-to-add-labels' of https://github.com/fernandezvara/nomad into f-docker-labels
2015-11-17 16:02:42 -08:00
Chris Bednarski
3b7c252090
Improve phrasing in log messages
2015-11-17 15:17:44 -08:00
Alex Dadgar
7551a263c5
Merge pull request #389 from achanda/name
...
Set a name for the container
2015-11-17 15:07:23 -08:00
Chris Bednarski
629cdd6baa
Clean up extraneous variables
2015-11-17 14:51:38 -08:00
Chris Bednarski
7f117b3b55
That's not a declaration
2015-11-17 14:27:58 -08:00
Chris Bednarski
89c6f56059
Remove restrictions from docker networking mode; we assume users know what they are doing
2015-11-17 14:25:10 -08:00
Chris Bednarski
f2e8357e4a
Merge branch 'master' into f-docker-cleanup
2015-11-17 14:20:29 -08:00
Antonio Fernández
f7f83ee81c
allow to set labels on docker containers
2015-11-17 14:12:49 +01:00
Carlos Diaz-Padron
77923255b4
Add hostname parameter to Docker driver
2015-11-16 22:44:44 -08:00
Chris Bednarski
bac9bd60dc
Improve logging and DRY some of the port mapping code
2015-11-16 19:55:49 -08:00
Diptanu Choudhury
03847dd65a
Addressed some review comments
2015-11-16 22:29:06 -05:00
Chris Bednarski
d00c700318
go fmt
2015-11-16 16:23:03 -08:00
Chris Bednarski
714e1b52d1
Change logging port as %d to logging port.Value
2015-11-16 16:05:28 -08:00
Chris Bednarski
9f40143684
Merge branch 'master' into f-port-labels
2015-11-16 16:02:38 -08:00
Alex Dadgar
82f51601db
Track Task State in the client and capture Wait results
2015-11-16 15:14:21 -08:00
Diptanu Choudhury
c5102975e3
Made the code more DRY
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
e40229aed6
Fixed the docker auth config
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
7d44725370
Adding comments to fields in the docker driver config
2015-11-16 13:10:57 -08:00
Alex Dadgar
fa60d86fe5
mapstructure close quotes
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
5e876e9c86
Fixed the java driver config
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
9d76572831
Making sure that there is only one port_map block in the docker driver config
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
3b3907e367
Fixed the exec driver config
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
ba9f101660
Fixed the test related to setting env variables in tasks
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
0673b832fb
Fixed compilation issues with driver tests
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
78a0f82bc5
Making the config for drivers public
2015-11-16 13:10:57 -08:00
Diptanu Choudhury
4e05b27111
Implemented port labeling and driver configs
2015-11-16 13:10:57 -08:00
Chris Bednarski
ef00ab3198
Change this to a valid IP address so docker can bind to it
2015-11-12 21:46:59 -08:00
Chris Bednarski
2f05a15aa5
Expose mapped ports
2015-11-12 17:23:04 -08:00
Alex Dadgar
d3e2455459
Merge pull request #408 from hashicorp/f-client-restore
...
Client Restore State Fixes
2015-11-11 12:32:11 -08:00
Chris Bednarski
b637ca7f60
Added some comments to the test to explain why we're doing stuff this way
2015-11-10 17:48:06 -08:00
Chris Bednarski
c5682fc751
Change dockerIs* to accept *testing.T for logging
2015-11-10 17:43:08 -08:00
Alex Dadgar
787164044d
Enable Open tests for Exec/Java
2015-11-10 16:59:52 -08:00
Alex Dadgar
90336a160e
Guard mounting dev/ and proc/ and TaskRunner_RestoreState test
2015-11-10 16:35:33 -08:00
Chris Bednarski
7f3a2595af
Change Docker fingerprinter to INFO and not error when the connection to the daemon fails; we simply assume docker isn't there.
2015-11-10 16:18:52 -08:00
Alex Dadgar
933498e388
Client Restore test
2015-11-10 16:03:18 -08:00
Chris Bednarski
e5688620e4
Changed behavior for Docker ENV
...
- Docker ENV variables now work the same way in production, dev, and test
- Docker ENV variables are *ignored* if docker.endpoint is present in the Nomad config file
- Remote tests now work correctly
2015-11-10 15:54:31 -08:00
Alex Dadgar
d56f9715c9
Comments on alive
2015-11-06 11:26:14 -08:00
Alex Dadgar
2321bddf2e
Add Valid command to spawner and make executors check when opening
2015-11-06 11:23:27 -08:00