Commit Graph

8832 Commits

Author SHA1 Message Date
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
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
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
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
Alex Dadgar
b02cce0efc fix metalinter checking ui dir 2017-09-19 11:49:34 -05:00
Alex Dadgar
7743872a8b Merge pull request #3250 from hashicorp/b-logs
Fix gzip encoding
2017-09-19 11:34:31 -05:00
Alex Dadgar
4c38cd6adc vendor gzip 2017-09-19 11:31:42 -05:00
Alex Dadgar
a66f32ea58 always gzip 2017-09-19 10:37:49 -05:00
Alex Dadgar
46ab2d69b1 handle errors when streaming logs 2017-09-19 10:37:49 -05:00
Alex Dadgar
2e29851b82 Merge pull request #3249 from hashicorp/b-07-upgrade
Upgrade path fixes
2017-09-19 10:29:05 -05:00
Alex Dadgar
cac2480793 fix test 2017-09-19 10:28:23 -05:00
Alex Dadgar
907f234a04 Fix upgrading from 0.6.x to 0.7.0 2017-09-19 10:28:14 -05:00
Alex Dadgar
66776b7c83 Merge pull request #3248 from hashicorp/f-sync
Sync
2017-09-19 10:17:48 -05:00
Alex Dadgar
ddc2efa4ac sync 2017-09-19 10:08:23 -05:00
Michael Lange
7b01e43b7c Merge pull request #3232 from hashicorp/d-ui-api-doc
Document each route in the UI for the API docs
2017-09-18 19:52:04 -05:00
Michael Lange
2eaa26d492 Merge pull request #3233 from hashicorp/d-ui-guide
New UI Guide for learning the Nomad UI
2017-09-18 19:51:53 -05:00
Michael Schurter
c1cf162d83 Merge pull request #3105 from hashicorp/f-876-restart-unhealthy
Restart unhealthy tasks
2017-09-17 19:38:32 -07:00
Michael Lange
e0b2c419b8 New UI Guide for learning the Nomad UI 2017-09-17 18:13:53 -05:00
Michael Lange
e50f944cc7 Document each route in the UI for the API docs 2017-09-17 18:12:15 -05:00
Chelsea Komlo
7e3fc68cb0 Merge pull request #3240 from hashicorp/d-metrics-guide-fix
Metrics guide fix
2017-09-17 18:54:03 -04:00
Chelsea Holland Komlo
0447f5b7c8 add circonus as a metric tool 2017-09-17 22:51:19 +00:00
Chelsea Holland Komlo
f237adfa25 enumerate data tools nomad supports 2017-09-17 21:30:25 +00:00
Chelsea Holland Komlo
0d4825956f update links for github 2017-09-17 21:15:58 +00:00
Chelsea Komlo
1dce0c1b4e Merge pull request #3226 from hashicorp/f-acl-cli-info
Add ACL token info
2017-09-17 15:03:25 -04:00
Chelsea Holland Komlo
a90ec92e06 update documentation 2017-09-17 18:47:06 +00:00
Chelsea Holland Komlo
eee7761e8a add documentation for token info 2017-09-17 18:45:32 +00:00
Chelsea Holland Komlo
83fefabe71 add command to cli
add extra verification test
2017-09-17 18:45:32 +00:00
Chelsea Holland Komlo
57c3ab03a0 add acl token info 2017-09-17 18:45:32 +00:00
Chelsea Komlo
8798fc1b14 Merge pull request #3235 from hashicorp/f-acl_policy_info
ACL policy info
2017-09-17 14:37:58 -04:00
Chelsea Holland Komlo
87f1d1e491 add missing command 2017-09-17 18:22:07 +00:00
Chelsea Holland Komlo
62823ce7ee add policy with rules for documentation 2017-09-17 18:17:53 +00:00
Chelsea Holland Komlo
7ee27f99e8 small fixups 2017-09-17 18:17:53 +00:00
Chelsea Holland Komlo
94c12630b5 documentation; add to existing commands 2017-09-17 18:17:53 +00:00
Chelsea Holland Komlo
c651ca45b5 acl policy info 2017-09-17 18:17:17 +00:00
Alex Dadgar
5628511bfb Changelog 2017-09-17 10:58:40 -07:00
Alex Dadgar
033a0776f3 Merge pull request #3229 from epipho/fix-stats
Fix incorrect docker stats
2017-09-17 10:51:25 -07:00
Alex Dadgar
6dda055717 Merge pull request #3237 from hashicorp/d-metrics-documentation
WIP: Guide to nomad metrics integrations
2017-09-17 10:50:43 -07:00