Fix lxc module to operate as per the docs for container memory configuration#42631
Merged
cachedout merged 6 commits intosaltstack:developfrom Aug 1, 2017
jeduardo:lxc-consistency-fixes
Merged
Fix lxc module to operate as per the docs for container memory configuration#42631cachedout merged 6 commits intosaltstack:developfrom jeduardo:lxc-consistency-fixes
cachedout merged 6 commits intosaltstack:developfrom
jeduardo:lxc-consistency-fixes
Conversation
…n the documentation.
|
@jeduardo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @terminalmage, @kiorky and @mgwilliams to be potential reviewers. |
Contributor
|
Go Go Jenkins! |
Contributor
Author
|
@cachedout a lot of jenkinsing for such a simple change. :) Any idea why it's failing? |
Contributor
|
@jeduardo Jenkins is having some issues. This looks fine though and passed the relevant tests. |
Contributor
Author
|
@cachedout ah excellent. Thanks for merging it! |
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.
What does this PR do?
It changes the calculation logic for the property
lxc.cgroup.memory.limit_in_byteswritten to the lxc configuration of a given container to behave in a manner consistent to what is described in the Salt documentation.What issues does this PR fix or reference?
It changes the behaviour of the lxc module to work as specified in the documentation.
Previous Behavior
The amount of memory that should be available to the container is multiplied by 1024 only once, being converted to KB instead of MB.
New Behavior
The amount of memory that should be available to the container is multiplied by 1024 twice, converting it first to KB and then to MB, allowing the module to work as specified in the configuration.
Tests written?
No