-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: support net priority flag #1576
Conversation
only implment net-priority in client end. Signed-off-by: Ace-Tang <aceapril@126.com>
Codecov Report
@@ Coverage Diff @@
## master #1576 +/- ##
==========================================
+ Coverage 41.54% 41.58% +0.04%
==========================================
Files 267 267
Lines 17375 17377 +2
==========================================
+ Hits 7218 7227 +9
+ Misses 9264 9258 -6
+ Partials 893 892 -1
|
@@ -1964,6 +1964,10 @@ definitions: | |||
QuotaID: | |||
type: "string" | |||
description: "set disk quota by specified quota id, if id < 0, it means pouchd alloc a unique quota id" | |||
NetPriority: | |||
description: "net priority." |
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.
Could you add more description of this field? More detailed content makes more people know more about the great things you are doing.
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.
No, it will be TODO
things.
@@ -1964,6 +1964,10 @@ definitions: | |||
QuotaID: | |||
type: "string" | |||
description: "set disk quota by specified quota id, if id < 0, it means pouchd alloc a unique quota id" | |||
NetPriority: |
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.
NetPriority seem a property of network endpoint. A container may have many endpoints, we may apply different Priorities to different endpoints. Can we consider the situation?
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.
Since we not implement in sever, so we just add a flag called NetPriority
to prepare
@@ -72,6 +72,7 @@ type container struct { | |||
ulimit Ulimit | |||
pidsLimit int64 | |||
shmSize string | |||
netPriority int64 |
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.
what is the reason to use int64?
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.
swagger generate with
type: "integer"
default: 0
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 you wanna set a specific type, maybe you can consider the following way:
BlkioWeight:
description: "Block IO weight (relative weight), need CFQ IO Scheduler enable."
type: "integer"
format: "uint16"
x-nullable: false
minimum: 0
maximum: 1000
LGTM |
only implment net-priority in client end.
Signed-off-by: Ace-Tang aceapril@126.com
Ⅰ. Describe what this PR did
Only implement net-priority in client end, consider net resource control is not good enough, we not implement it in server client.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews