Commit Graph

8865 Commits

Author SHA1 Message Date
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
8750e2da3d Merge pull request #3284 from hashicorp/f-lint
Enable more linters
2017-09-26 15:46:42 -07: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
5cd1d19cc8 Add rkt default network to Travis
The current Travis setup scripts copy in rkt, but do not set up a
default container network.

Here we copy the container network setup over from the vagrant setup
scripts.
2017-09-26 22:20:01 +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
Chelsea Komlo
cfe4f0534a Merge pull request #3275 from AlmZ/patch-1
Fix typo in Prometheus Configuration url
2017-09-26 15:05:43 -04:00
Chelsea Komlo
83b8b8cc74 Merge pull request #3274 from hsmade/patch-2
Update metrics.html.md
2017-09-26 15:03:48 -04:00
Michael Schurter
58c66d2b1d Merge pull request #3277 from hashicorp/b-fix-grace-keyword
grace_period -> grace
2017-09-26 13:21:21 -05:00
Lasse Dalegaard
a7f5f8a363 Small logging fix in rkt/driver 2017-09-26 19:36:13 +02:00
Michael Schurter
b381b5fff7 grace_period -> grace 2017-09-26 10:21:35 -07: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
Alex Dadgar
9b3555f206 Namespace Quotas -> Resource Quotas 2017-09-26 09:51:28 -07:00
Almaz Gabdelkhadiev
8db82363b1 Fix typo in Prometheus Configuration url 2017-09-26 17:51:21 +03:00
Wim Fournier
aa5ecfb215 Update metrics.html.md
Fix typo
2017-09-26 13:06:59 +02:00
Lasse Dalegaard
f6ce83c702 Update CHANGELOG.md 2017-09-26 10:25:27 +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
Lasse Dalegaard
1d75ff8194 Discard errors from rkt status and cat-manifest
Since we don't actually show these errors anywhere, just discard them
right away.
2017-09-26 09:05:47 +02:00
Chelsea Komlo
22a9978459 Merge pull request #3270 from hashicorp/f-acl-job-revert
Add ACL for job revert endpoint
2017-09-25 18:43:08 -04:00
Chelsea Komlo
d0cb81285a Merge pull request #3264 from hashicorp/f-acl-token-update
Update ACL token
2017-09-25 17:56:04 -04:00
Chelsea Holland Komlo
28177185f2 add acl documentation 2017-09-25 21:53:32 +00:00
Chelsea Holland Komlo
7d3aeec2e7 Add ACL for Revert Job endpoint 2017-09-25 21:51:19 +00:00
Alex Dadgar
ec807621fd Merge pull request #3268 from hashicorp/f-upgrade
Document need to specify network_interface on 0.6
2017-09-25 13:51:40 -07:00
Alex Dadgar
f350dd13dd Document need to specify network_interface on 0.6
This PR enhances the upgrade documentation from 0.5.x to 0.6.x

Fixes https://github.com/hashicorp/nomad/issues/3236
2017-09-25 13:50:07 -07:00
Chelsea Holland Komlo
be1dcd08dd fixups from code review 2017-09-25 19:42:03 +00:00
Chelsea Komlo
6e03412eb8 Merge pull request #3265 from hashicorp/f-refactor-emit-client-metrics
Move setGaugeForAllocationStats  to emitClientMetrics
2017-09-25 14:27:58 -04:00
Chelsea Komlo
d99fc11f0c Merge pull request #3266 from hashicorp/f-acl-job-validate
Add ACL for job validate endpoint
2017-09-25 14:09:02 -04:00
Alex Dadgar
5ab3bfb023 Merge pull request #3267 from hashicorp/b-deployment-gc
Run deployment garbage collector on an interval
2017-09-25 11:05:06 -07:00
Alex Dadgar
c07a932cea Run deployment garbage collector on an interval
Fixes https://github.com/hashicorp/nomad/issues/3244
2017-09-25 11:04:40 -07:00
Alex Dadgar
f13edecc8c Merge pull request #3260 from hsmade/patch-1
Update network.html.md
2017-09-25 10:57:26 -07:00
Chelsea Holland Komlo
10f4b4a82e fix type 2017-09-25 17:41:17 +00:00
Chelsea Holland Komlo
445070eb6a add acl for job validate endpoint 2017-09-25 17:34:02 +00:00
Alex Dadgar
0fa69b7f82 Merge pull request #3263 from anubhavmishra/patch-1
update consul version to 0.9.3
2017-09-25 10:21:18 -07:00
Chelsea Holland Komlo
8943a29428 Move setGaugeForAllocationStats to emitClientMetrics 2017-09-25 16:05:49 +00:00
Chelsea Holland Komlo
edf14142de update acl token 2017-09-25 15:54:06 +00:00
Anubhav Mishra
e2c1160b34 update consul version to 0.9.3 2017-09-23 20:38:32 -07:00
Wim Fournier
fb8cf7be20 Update network.html.md
Fixing #3259
2017-09-22 10:24:05 +02:00
Charlie Voiselle
5c44105b64 Merge pull request #3258 from DavidCalvert/patch-1
Minor typo on consul.html.md
2017-09-21 09:06:06 -05:00
David Calvert
ccc4d1d683 Minor typo on consul.html.md 2017-09-21 11:06:39 +02:00
Lasse Dalegaard
bdfd8d8810 Expose rkt DriverNetwork
Currently the rkt driver does not expose a DriverNetwork instance after
starting the container, which means that address_mode = 'driver' does
not work.

To get the container network information, we can call `rkt status` on
the UUID of the container and grab the container IP from there.

For the port map, we need to grab the pod manifest as it will tell us
which ports the container exposes. We then cross-reference the
configured port name with the container port names, and use that to
create a correct port mapping.

To avoid doing a (bad) reimplementation of the appc schema(which rkt
uses for its manifest) and rkt apis, we pull those in as vendored
dependencies. The versions used are the same ones that rkt use in their
glide dependency configuration for version 1.28.0.
2017-09-21 00:34:22 +02:00
Lasse Dalegaard
3dafacdd72 Use rkt prepare + run-prepared instead of run.
The rkt driver currently executes run and asks that the pod UUID is
written to a file that is then polled for changes for up to five
seconds. Many container fetches will take longer than this, so this
method will often not be able to track the pod UUID reliably.

To avoid this problem, rkt allows pods to be first prepared, which will
return their UUID, and then run as a second invocation.

Here we convert the rkt driver's Start method to use this method
instead. This way, the UUID will always be tracked correctly.
2017-09-21 00:17:31 +02:00
Michael Schurter
a1e08240a1 Merge pull request #3253 from hashicorp/b-make-shellcheck-happy
Fix shellcheck's complaints about find loop
2017-09-20 14:48:06 -05:00
Michael Schurter
9c87332b71 Fix shellcheck's complaints about find loop 2017-09-19 17:41:20 -05:00
Alex Dadgar
fd57773121 Release v0.7.0-beta1 2017-09-19 12:56:28 -05:00
Alex Dadgar
c80ad75c51 generated code 2017-09-19 12:17:16 -05:00
Alex Dadgar
3fbd832f26 bump version 2017-09-19 12:13:00 -05:00
Alex Dadgar
afdb1a4915 changelog 2017-09-19 12:06:52 -05:00