Skip to content
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

Merged
merged 1 commit into from
Jul 9, 2018
Merged

feature: support net priority flag #1576

merged 1 commit into from
Jul 9, 2018

Conversation

Ace-Tang
Copy link
Contributor

only implment net-priority in client end.

Signed-off-by: Ace-Tang [email protected]

Ⅰ. 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

only implment net-priority in client end.

Signed-off-by: Ace-Tang <[email protected]>
@codecov-io
Copy link

Codecov Report

Merging #1576 into master will increase coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
cli/container.go 0% <0%> (ø) ⬆️
cli/common_flags.go 0% <0%> (ø) ⬆️
ctrd/image.go 79.42% <0%> (+2.85%) ⬆️
apis/server/server.go 48.75% <0%> (+5%) ⬆️

@shaloulcy shaloulcy requested review from rudyfly and removed request for rudyfly June 22, 2018 05:53
@@ -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."
Copy link
Collaborator

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.

Copy link
Contributor Author

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:
Copy link
Contributor

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?

Copy link
Contributor Author

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
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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

@rudyfly
Copy link
Collaborator

rudyfly commented Jul 9, 2018

LGTM

@rudyfly rudyfly merged commit f3c247c into AliyunContainerService:master Jul 9, 2018
@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants