[WIP] cleanup container validation#38676
Closed
thaJeztah wants to merge 5 commits intomoby:masterfrom
Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #38676 +/- ##
=========================================
Coverage ? 36.52%
=========================================
Files ? 610
Lines ? 45242
Branches ? 0
=========================================
Hits ? 16524
Misses ? 26445
Partials ? 2273 |
Member
Author
|
Removed |
743d2ea to
fcf5b43
Compare
Member
Author
|
Okay, these are genuine (some work to do still); https://jenkins.dockerproject.org/job/Docker-PRs-powerpc/13230/console Also interesting; looks like those tests run exactly the same command, so perhaps there's a bug in those tests as well and; we should have a different way of testing those validations (guess they are skipped on the other machines because they don't have swap enabled) |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Some container configurations are modified in adaptContainerSettings, so validate them _after_ adjusting, instead validating settings that are modified afterwards. This can simplify validation, and perform validating invalid options that were currently not validated. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The config was only verified in a single case (containerCreate), and nil was passed in all other occurences, so it made more sense to explicitly verify them separate. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…fig" Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
To unset memory-swapiness, the client sends `-1` as a magic value. Previously this magic value was handled deep inside the daemon validation logic, and an additional boolean value was also in use to handle container updates. Instead of sending the magic value to the daemon, handle this value at the API layer (as it's effectively a convention used by the API, but not an actual valid value for this field. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
fcf5b43 to
9e16cd9
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Refactor some validation code to move
fixMemorySwappiness()elsewhere than buried deep in the daemon validation, whereas it's actually use converting API requests to actual values so (I think) should be handled somewhere in the API, or at least earlier in the steps..