-
Notifications
You must be signed in to change notification settings - Fork 950
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
fix: make cpuquota, MemorySwappiness validation compatible with docker #2474
fix: make cpuquota, MemorySwappiness validation compatible with docker #2474
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2474 +/- ##
==========================================
- Coverage 69% 68.96% -0.04%
==========================================
Files 277 277
Lines 18298 18298
==========================================
- Hits 12626 12619 -7
- Misses 4246 4253 +7
Partials 1426 1426
|
029d517
to
6bc8a39
Compare
apis/swagger.yml
Outdated
@@ -2663,7 +2662,7 @@ definitions: | |||
description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add more details in the description?
@@ -115,7 +115,7 @@ func (suite *PouchRunMemorySuite) TestRunWithMemoryswappiness(c *check.C) { | |||
"--memory-swappiness", "-1", | |||
"--name", cname, busyboxImage, "top") | |||
DelContainerForceMultyTime(c, cname) | |||
c.Assert(res.ExitCode, check.Equals, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use the swagger validation, this test case should not passed, Right?
refactor: logCreateOption before validation, it enable developer to see what's wrong. Signed-off-by: zhuangqh <[email protected]>
6bc8a39
to
335c90c
Compare
Signed-off-by: zhuangqh [email protected]
Ⅰ. Describe what this PR did
correct validation rule
refactor: logCreateOption before validation, it enable developer to see what's wrong.
Ⅱ. Does this pull request fix one issue?
fixes #2473
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
stricter validation in github.com/alibaba/pouch/daemon/mgr/container_validation.go