Michael Schurter
cde796162c
Always advertise driver IP when in driver mode
...
Fixes #3681
When in drive address mode Nomad should always advertise the driver's IP
in Consul even when no network exists. This matches the 0.6 behavior.
When in host address mode Nomad advertises the alloc's network's IP if
one exists. Otherwise it lets Consul determine the IP.
I also added some much needed logging around Docker's network discovery.
2018-01-18 15:35:24 -08:00
Michael McCracken
561376e3b9
lxc_test: add test for contents of file in bind-mounted dir
...
Ensure that bind mounting via the volumes config really did work.
Signed-off-by: Michael McCracken <mikmccra@cisco.com >
2018-01-18 05:36:45 -08:00
Michael McCracken
f86fbdcf1a
Simplify with gofmt -s
...
Signed-off-by: Michael McCracken <mikmccra@cisco.com >
2018-01-18 04:17:42 -08:00
Michael McCracken
8331cbdd57
lxc: add tests for volume support
...
Signed-off-by: Michael McCracken <mikmccra@cisco.com >
2018-01-18 04:17:42 -08:00
Michael McCracken
bbdd58963d
lxc: Add config flag to disable volume support
...
Signed-off-by: Michael McCracken <mikmccra@cisco.com >
2018-01-18 04:17:42 -08:00
Michael McCracken
b597916a95
Add volumes config to LXC driver
...
Allow lxc driver to accept bind mount config similarly to the docker
driver.
Includes some static sanity checks in Validate step
Signed-off-by: Michael McCracken <mikmccra@cisco.com >
2018-01-18 04:17:42 -08:00
Alex Dadgar
47f90683fb
Remove networking from basic resources
2018-01-12 14:33:42 -08:00
Charlie Voiselle
45c3d8d5a1
Found more priviledge.
...
priviledge -> privilege
2018-01-12 09:44:53 -05:00
Charlie Voiselle
8d6bd6dca4
fix typo
...
Priviledge -> privilege
2018-01-08 15:56:07 -05:00
Michael Schurter
0c2c3568a6
Skip tests that require root when not root
...
Also skip Chown on allocdir migration on Windows and when non-root.
Windows doesn't support it, and it will always fail as a non-root user.
2017-12-12 16:58:27 -08:00
Alex Dadgar
db63054740
Keyify struct
2017-12-11 17:23:14 -08:00
Michael Schurter
b79194f96c
Fix test broken by mock updates
2017-12-08 16:45:25 -08:00
Michael Schurter
74e7d57b75
Test Consul from TaskRunner thoroughly
...
Rely less on the mockConsulServiceClient because the real
consul.ServiceClient needs all the testing it can get!
2017-12-08 12:03:00 -08:00
Chelsea Holland Komlo
ae10b638db
code review fixes
2017-12-07 13:46:25 -05:00
Chelsea Holland Komlo
f09e3ec798
set default kill signal on executor shutdown
2017-12-07 11:40:15 -05:00
Chelsea Holland Komlo
27b666e935
extend configurable kill signal to java driver
2017-12-07 11:40:10 -05:00
Chelsea Holland Komlo
927c0a4d88
change location of default kill signal
2017-12-06 17:48:25 -05:00
Chelsea Holland Komlo
8356c6183c
extract signal helper into utils
2017-12-06 14:36:44 -05:00
Chelsea Holland Komlo
9e49836d4f
move kill_signal to task level, extend to docker
2017-12-06 14:36:39 -05:00
Chelsea Holland Komlo
079e6b5fb1
allow controlling the stop signal in exec/raw_exec
2017-12-06 11:28:45 -05:00
Chelsea Komlo
fef15f447a
Merge pull request #3612 from hashicorp/docker-rkt-user
...
Set user for rkt tasks
2017-12-05 17:45:08 -05:00
Chelsea Holland Komlo
c4e1dc339d
fix up test
2017-12-05 10:12:40 -05:00
Chelsea Holland Komlo
723e47c98c
remove unused user option
2017-12-04 18:01:31 -05:00
Michael Schurter
104e0e5b19
Merge pull request #3615 from hashicorp/b-rkt-host-ports
...
rkt: Don't require port_map with host networking
2017-12-04 14:49:42 -08:00
Chelsea Holland Komlo
23b7042dd5
add ability to specify user for rkt
2017-12-04 14:21:48 -05:00
Michael Schurter
730e2aa4c8
rkt: Don't require port_map with host networking
...
Also don't try to return a DriverNetwork with host networking. None will
ever exist as that's the point of host networking: rkt won't create a
network namespace.
2017-12-01 17:23:25 -08:00
Chelsea Holland Komlo
584644287e
get KillTimeout in seconds, not nanoseconds
2017-12-01 10:43:00 -05:00
Chelsea Holland Komlo
9a719cbea2
Support StopTimeout for Docker tasksw
...
Update github.com/fsouza/go-dockerclient
2017-11-29 14:33:05 -05:00
Preetha Appan
d522149f6b
Missed assert in one place
2017-11-20 13:04:38 -06:00
Preetha Appan
ee4b4d859d
Better error validation, and added test case for invalid sysctl inputs
2017-11-20 12:07:18 -06:00
Preetha Appan
0d4797711b
Address some review comments
2017-11-20 11:15:09 -06:00
Preetha Appan
9e07471e48
Fix gofmt warnings
2017-11-18 09:23:09 -06:00
Preetha Appan
48829e88d0
Fix test compilation after rebase
2017-11-17 17:46:04 -06:00
Samuel BERTHE
e6c0372318
review(docker driver): sysctls -> sysctl + ulimits -> ulimit
2017-11-17 16:30:45 -06:00
Samuel BERTHE
657619c0ec
Oops
2017-11-17 16:14:14 -06:00
Samuel BERTHE
d15f01d7df
💄
2017-11-17 16:03:22 -06:00
Samuel BERTHE
cf586996f4
test(docker driver): testing sysctls and ulimits
2017-11-17 16:03:22 -06:00
Samuel BERTHE
84a089433d
feat(docker driver): adds sysctls and ulimits configs
2017-11-17 16:03:22 -06:00
Michael Schurter
96f56cebf8
Merge pull request #3562 from hashicorp/b-3561-rkt-rm
...
Remove rkt pods when exiting
2017-11-16 17:30:21 -08:00
Michael Schurter
9929ac2382
Improve rktRemove error message
2017-11-16 15:45:14 -08:00
Michael Schurter
ce3fbb62b7
Remove rkt pods when exiting
...
Fixes #3561
2017-11-16 14:33:44 -08:00
Michael Schurter
b37a03a458
Add a test demonstrating the bug
...
Fails on Docker 17.09, passes on Docker 17.06 and earlier
2017-11-14 15:25:52 -08:00
Preetha Appan
8e70fd812a
Make device mounting unit test verify configuration via docker inspect
2017-11-13 09:56:54 -06:00
Preetha Appan
b2eeab1b8c
Unit test (linux only) that tests mounting a device in the docker driver
2017-11-13 09:56:54 -06:00
Preetha Appan
929a781ae4
Add default value for cgroup permissions for device if not set
2017-11-13 09:56:54 -06:00
Preetha Appan
b0c03e45ff
Remove unnecessary check since validate method already checks this
2017-11-13 09:56:54 -06:00
Preetha Appan
85c5218b78
Add support for passing device into docker driver
2017-11-13 09:56:54 -06:00
Alex Dadgar
80b434d467
Merge pull request #3411 from cheeseprocedure/f-qemu-graceful-shutdown
...
Qemu driver: graceful shutdown feature
2017-11-03 16:41:34 -07:00
Matt Mercer
f734d842f5
Qemu driver: clean up logging; fail unsupported features on Windows
2017-11-03 15:40:20 -07:00
Alex Dadgar
a94bab6491
fix spelling mistake
2017-11-03 15:04:59 -07:00