This repository was archived by the owner on Jan 21, 2020. It is now read-only.
[Experimental] - Max resource lifetime controller - #545
Merged
Merged
Conversation
|
Please sign your commits following these rules: $ git clone -b "maxlife" git@github.com:chungers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842353806272
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
Codecov Report
@@ Coverage Diff @@
## master #545 +/- ##
==========================================
+ Coverage 56.66% 58.43% +1.76%
==========================================
Files 57 32 -25
Lines 3969 2069 -1900
==========================================
- Hits 2249 1209 -1040
+ Misses 1432 717 -715
+ Partials 288 143 -145Continue to review full report at Codecov.
|
added 4 commits
May 23, 2017 17:28
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a simple utility that sets maximum resource lifetime by scanning and finding the oldest resource. If the oldest instance's age is greater than the set max lifetime, and that the system is in steady-state (ie, the successive counts of instances are not decreasing over time), then destroy the instance. Once the instance is destroyed, the other controller (specifically the Group plugin) will detect the change and replace the instance with a new one.
This is useful for rotating compute nodes / workers in a cluster such that no instances can exceed a certain lifetime and can be subjected to attacks. This serves as a POC for combining container and infrastructure orchestration to improve security of a compute cluster.
It's possible to add interaction with a flavor plugin to force a "Drain" of the targeted resource before destruction. It will be done in a future PR.
A new subcommand
xfor experimental is added to the CLI so that this feature is added as a subcommand of the experimental features.Signed-off-by: David Chung david.chung@docker.com