Commit Graph

1287 Commits

Author SHA1 Message Date
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
Matt Mercer
66f9840dd0 Qemu driver: tweaks in response to PR feedback
Remove attribute for long qemu monitor path; misc cleanup; update tests
2017-11-03 11:28:56 -07:00
Matt Mercer
185658507f Qemu driver: defer cleanup sooner 2017-11-01 17:37:43 -07:00
Matt Mercer
15d7565931 Qemu driver: clean up test logging; retry integration test for longer 2017-11-01 17:21:56 -07:00
Matt Mercer
60030d89d1 Use strings.Replace() instead of custom function 2017-11-01 15:31:35 -07:00
Matt Mercer
2924bada55 Qemu driver: basic testing of graceful shutdown feature 2017-11-01 15:31:30 -07:00
Matt Mercer
1ff97035f0 Qemu driver: include PIDs in log output 2017-11-01 15:31:24 -07:00
Matt Mercer
200a12cbcc Qemu driver: ensure proper cleanup of resources 2017-11-01 15:31:20 -07:00
Matt Mercer
22f390d75a Qemu driver: minor logging fixes 2017-11-01 15:31:14 -07:00
Matt Mercer
3f6fdfcb9b Standardize driver.qemu logging prefix 2017-11-01 15:30:44 -07:00
Matt Mercer
00e3cc869d Qemu driver: add graceful shutdown feature 2017-11-01 15:30:36 -07:00
Jonathan Ballet
15114e448e docker: changed OOM killed error message 2017-10-27 20:30:52 +02:00
Jonathan Ballet
e5a790753d docker: log that a container has been killed by the OOM killer
Fix: #2203 (at least for Docker tasks)
2017-10-27 18:05:27 +02:00
Alex Dadgar
f5549a6eb9 go style vars 2017-10-25 10:49:34 -07:00
Alex Dadgar
366e91276f fix two flaky tests 2017-10-23 18:15:52 -07:00
Alex Dadgar
8accabcd87 move to consul freeport implementation 2017-10-23 16:51:40 -07:00
Alex Dadgar
e1b1465081 Standardize retrieving a free port into a helper package 2017-10-23 16:48:20 -07:00
Alex Dadgar
3be474b811 don't double parallel 2017-10-23 16:48:06 -07:00
Alex Dadgar
41773c3fdf respond to comments 2017-10-23 15:50:27 -07:00
Alex Dadgar
5b4e31bb5b Skip if no docker 2017-10-19 16:55:10 -07:00
Alex Dadgar
8de487c241 fix flaky java tests 2017-10-19 16:49:57 -07:00
Alex Dadgar
e175c56082 Undo darwin user setting 2017-10-19 16:49:57 -07:00
Alex Dadgar
651159077b Run as user on mac 2017-10-19 16:49:57 -07:00
Alex Dadgar
838e7cbac9 sudo docker works 2017-10-19 16:49:57 -07:00
Alex Dadgar
039c1f84c6 docker tests 2017-10-19 16:49:57 -07:00
Michael Schurter
4a6255b6c6 Add logging around moby/moby#32648 bug 2017-10-18 10:44:03 -07:00
Michael Schurter
87b86230c4 Properly fail rkt fingerprinting on old vesions 2017-10-16 13:58:58 -07:00
Michael Schurter
dbc3a3baaa Squelch repeated rkt version warnings 2017-10-16 12:09:47 -07:00
Alex Dadgar
1f3920ffdf rkt remove allocid 2017-10-13 10:07:50 -07:00
Adam Stankiewicz
79eccb2b1e Remove AllocID from ExecutorContext 2017-10-13 17:07:49 +02:00
Alex Dadgar
2c4c6b6ff6 Nomad UI Command 2017-10-09 23:01:55 -07:00
Michael Schurter
9b456787d0 Merge pull request #3288 from simar7/qemu-improvements
qemu: Add bound checks for memory assignment
2017-10-02 14:47:05 -07:00
Simarpreet Singh
d45670863c qemu: Fix lower memory bound to 128M
Signed-off-by: Simarpreet Singh <simar@linux.com>
2017-10-02 14:29:44 -07:00
Simarpreet Singh
82b8766da8 gofmt: format qemu.go and qemu_test.go
Signed-off-by: Simarpreet Singh <simar@linux.com>
2017-10-02 13:16:48 -07:00
Michael Schurter
04b8f8e7fc Remove structs import from api
Goes a step further and removes structs import from api's tests as well
by moving GenerateUUID to its own package.
2017-09-29 10:36:08 -07:00
Michael Schurter
900e708577 Properly autodetect Docker IP in Windows
Our Docker network plugin autodetection code was erroneously treating
Window's default network `nat` as a plugin and defaulting to it instead
of the host.

Fixes #3218
2017-09-27 16:49:23 -07:00
Michael Schurter
08f8411163 Only build rkt driver on linux
Build stub for non-linux targets
2017-09-27 14:21:45 -07:00
Simarpreet Singh
0fa2f3cbde qemu: Add bound checks for memory assignment
Signed-off-by: Simarpreet Singh <simar@linux.com>
2017-09-26 21:07:48 -07:00
Michael Schurter
eeeb544a2d Merge pull request #3256 from dalegaard/master
Enable rkt driver to use address_mode = 'driver'
2017-09-26 18:04:37 -05:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Lasse Dalegaard
5decea6a59 Ignore rkt network failure if container died early
If the container dies before the network can be read, we now ignore the
error coming out of the network information polling loop. Nomad will
restart the task regardless, so we might be masking the actual error.

The polling loop for the rkt network information, inside the `Start`
method, was getting a bit unwieldy. It's been refactored out so it's not
a seperate function.
2017-09-27 00:15:27 +02:00
Lasse Dalegaard
c359ba44a5 Make rkt port mapping test not exit immediately
The rkt port mapping test currently starts redis with --version, which
obviously makes redis exit again almost immediately. This means that the
container exists before the network status can be queried, and so the
test fails.
2017-09-26 23:10:24 +02:00
Lasse Dalegaard
b537f16eff Improve rkt driver network status poll loop
The network status poll loop will now report any networks it ignored, as
well as a no-networks situations.
2017-09-26 21:49:45 +02:00
Lasse Dalegaard
eade50b938 Refactor rkt network status loop
The network status poll loop for the rkt drivers `Start` method was a
bit messy, and could not display the last encountered error. Here we
clean it up.
2017-09-26 21:27:12 +02:00
Lasse Dalegaard
a7f5f8a363 Small logging fix in rkt/driver 2017-09-26 19:36:13 +02:00
Lasse Dalegaard
dd934a60a7 Bump minimum rkt version to 1.27.0.
The changes introduces in #3256 require at least rkt 1.27.0 because of
a bug in the JSON output of `rkt status` in previous versions.

Here we upgrade all references to rkt's minimum version, and also make
travis and vagrant use this version when running tests.

Finally we add a CHANGELOG notice.
2017-09-26 19:15:43 +02:00
Lasse Dalegaard
ddec2f1617 Turn rkt network status failure into Start failure
If the rkt driver cannot get the network status, for a task with a
configured port mapping, it will now fail the Start() call and kill the
task instead of simply logging. This matches the Docker behavior.

If no port map is specified, the warnings will be logged but the task
will be allowed to start.
2017-09-26 10:20:57 +02:00
Lasse Dalegaard
3dd16a2212 Test for rkt driver setting DriverNetwork
To test that the rkt driver correctly sets a DriverNetwork, at least
when a port mapping is requested, we amend the
TestRktDriver_PortsMapping test with a small check.
2017-09-26 09:10:50 +02:00