Hugetlbfs support based on empty dir volume plugin#50072
Conversation
|
Hi @squall0gd. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
cbd37ac to
9f2fcf8
Compare
| // +optional | ||
| Medium StorageMedium `json:"medium,omitempty" protobuf:"bytes,1,opt,name=medium,casttype=StorageMedium"` | ||
| // +optional | ||
| HugetlbfsSize string `json:"hugetlbfsSize,omitempty" protobuf:"bytes,3,opt,name=hugetlbfsSize"` |
There was a problem hiding this comment.
Since HugetlbfsSize is new-added. You'd need to run auto-gen scripts again (make update will run all auto-gen scripts).
| if isMnt && medium == mediumHugepages { | ||
| return nil | ||
| } | ||
| if ed.size == "" { |
There was a problem hiding this comment.
Does this mean that if we are using StorageMediumHugetlbfs, the size is also needed alongside?
If so, you'd better add some validations in pkg/api/validation/validation.go.
There was a problem hiding this comment.
It's required in that case. I will move this validation to pkg/api/validation/validation.go
| // +optional | ||
| Medium StorageMedium | ||
| // +optional | ||
| HugetlbfsSize string |
There was a problem hiding this comment.
It's kind of confusing to declare xxSize as string. May it be int?
| mounter mount.Interface | ||
| mountDetector mountDetector | ||
| plugin *emptyDirPlugin | ||
| size string |
There was a problem hiding this comment.
I think it's better to use Quantity here b/c I need to keep unit.
|
@squall0gd FYI, there is a proposal on HugePages here: kubernetes/community#837 /cc @derekwaynecarr |
|
i want to make sure we have agreement on the proposal referenced before merging this, but thank you for your help! |
|
/ok-to-test |
| StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs) | ||
| StorageMediumDefault StorageMedium = "" // use whatever the default is for the node | ||
| StorageMediumMemory StorageMedium = "Memory" // use memory (tmpfs) | ||
| StorageMediumHugetlbfs StorageMedium = "Hugetlbfs" // use hugepages |
| } | ||
|
|
||
| glog.V(3).Infof("pod %v: mounting hugepages for volume %v", ed.pod.UID, ed.volName) | ||
| mountOptions := []string{fmt.Sprintf("size=%s", ed.size)} |
There was a problem hiding this comment.
i don't understand why you have size.
size is bounded by sum resource requirement across containers on pod.
we need a new field specific for hugepages that aligns with pagesize. mount option.
There was a problem hiding this comment.
well I've used size w/o any reason - just want some, easy to track parameter, to verify that passing mount options is working correctly. Actually I'm waiting for proposal's merge to finalize implementing mount options and to play with unit tests. :)
7148723 to
3c0861b
Compare
|
/lgtm Thanks @squall0gd for your help getting this support. |
|
/retest Review the full test history for this PR. |
|
/test pull-kubernetes-e2e-kops-aws |
|
/retest |
1 similar comment
|
/retest |
|
/retest Review the full test history for this PR. |
073ac49 to
59a86e4
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: childsb, derekwaynecarr, eparis, smarterclayton, squall0gd Associated issue: 275 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/retest |
|
@squall0gd: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Automatic merge from submit-queue |
|
Curious how this got merged despite failing cross: |
|
@jdumars didn't notice this error before. Just some timeouts on e2e gates |
|
The test will need to be updated in order to accommodate the change. |
|
@jdumars Well it looks like we need to add type to magic number constant. Sadly we need to do this in another PR. |
|
opened #51984 to type-cast the comparison to the constant |
What this PR does / why we need it: Support for huge pages in empty dir volume plugin. More information about hugepages can be found here
Feature track issue: kubernetes/enhancements#275
Which issue this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close that issue when PR gets merged): fixes #Special notes for your reviewer:
Release note: