-
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
bugfix: failed to validate namespace value #2393
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2393 +/- ##
=========================================
- Coverage 68.45% 68.4% -0.06%
=========================================
Files 275 276 +1
Lines 18291 18283 -8
=========================================
- Hits 12522 12507 -15
- Misses 4340 4346 +6
- Partials 1429 1430 +1
|
daemon/mgr/container_validation.go
Outdated
return fmt.Errorf("invalid uts namespace mode %s", hostConfig.UTSMode) | ||
} | ||
|
||
if !ns.Valid(specs.PIDNamespace, hostConfig.IpcMode) { |
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.
PIDNamespace
or IPCNamespace
? So do that with UTS
.
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.
Big Bug, thanks!
related to issue #2378 |
@rudyfly , could you take a look at network part ? |
namespace related parameters not get validated, user should know the valid value and invalid value when they specify the related parameters. remove repeated code in network namespace Signed-off-by: Ace-Tang <[email protected]>
Signed-off-by: Ace-Tang <[email protected]>
ping @Ace-Tang |
please reopen it if you need |
Ⅰ. Describe what this PR did
namespace related parameters not get validated, user should know
the valid value and invalid value when they specify the related
parameters.
remove repeated code in network namespace
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
add namespace related tests for run command
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews