-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable rkt driver to use address_mode = 'driver' #3256
Commits on Sep 20, 2017
-
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.
Configuration menu - View commit details
-
Copy full SHA for 3dafacd - Browse repository at this point
Copy the full SHA 3dafacdView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for bdfd8d8 - Browse repository at this point
Copy the full SHA bdfd8d8View commit details
Commits on Sep 26, 2017
-
Discard errors from rkt status and cat-manifest
Since we don't actually show these errors anywhere, just discard them right away.
Configuration menu - View commit details
-
Copy full SHA for 1d75ff8 - Browse repository at this point
Copy the full SHA 1d75ff8View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 3dd16a2 - Browse repository at this point
Copy the full SHA 3dd16a2View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for ddec2f1 - Browse repository at this point
Copy the full SHA ddec2f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f6ce83c - Browse repository at this point
Copy the full SHA f6ce83cView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for dd934a6 - Browse repository at this point
Copy the full SHA dd934a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7f5f8a - Browse repository at this point
Copy the full SHA a7f5f8aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for eade50b - Browse repository at this point
Copy the full SHA eade50bView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for b537f16 - Browse repository at this point
Copy the full SHA b537f16View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 5cd1d19 - Browse repository at this point
Copy the full SHA 5cd1d19View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for c359ba4 - Browse repository at this point
Copy the full SHA c359ba4View commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 5decea6 - Browse repository at this point
Copy the full SHA 5decea6View commit details