Bug 1611988
Summary: | scheduler policy of BalancedResourceAllocation not include volume count | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | MinLi <minmli> |
Component: | Node | Assignee: | Avesh Agarwal <avagarwa> |
Status: | CLOSED ERRATA | QA Contact: | MinLi <minmli> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.11.0 | CC: | aos-bugs, avagarwa, jokerman, minmli, mmccomas, sjenning |
Target Milestone: | --- | ||
Target Release: | 3.11.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-10-11 07:23:07 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
MinLi
2018-08-03 08:03:00 UTC
I have tested that whenever alpha feature BalanceAttachedNodeVolumes is enabled, it takes volumes into account. You are not seeing the effect because you have just created one PV/PVC and it is not enough to see the impact of BalanceAttachedNodeVolumes. For real testing of this priority function, you will have to create more volumes and more nodes, and then you would check if the scheduler is spreading pods by taking even distribution of cpu, mem and volume into account. Anyway, i have sent following PR upstream which shows volumes (capacity and requested) whenever alpha feature BalanceAttachedNodeVolumes is enabled. This PR also fixes an issue, i found during this testing, where total requested values of cpu and mem were being reported incorrectly: https://github.com/kubernetes/kubernetes/pull/67094 After the above PR, the output will look like following that includes volumes too: I0807 19:33:17.810565 1 resource_allocation.go:69] mypod -> ip-172-18-0-4.ec2.internal: BalancedResourceAllocation, capacity 2000 millicores 8095694848 memory bytes, 39 volumes, total request 600 millicores 1480589312 memory bytes 1 volumes, score 9 I0807 19:33:17.810613 1 resource_allocation.go:69] mypod -> ip-172-18-1-197.ec2.internal: BalancedResourceAllocation, capacity 2000 millicores 8095694848 memory bytes, 39 volumes, total request 400 millicores 943718400 memory bytes 1 volumes, score 9 I0807 19:33:17.810663 1 resource_allocation.go:69] mypod -> ip-172-18-1-197.ec2.internal: LeastResourceAllocation, capacity 2000 millicores 8095694848 memory bytes, 39 volumes, total request 400 millicores 943718400 memory bytes 1 volumes, score 8 I0807 19:33:17.810762 1 resource_allocation.go:69] mypod -> ip-172-18-0-7.ec2.internal: BalancedResourceAllocation, capacity 2000 millicores 8095694848 memory bytes, 39 volumes, total request 900 millicores 1782579200 memory bytes 1 volumes, score 9 I0807 19:33:17.810810 1 resource_allocation.go:69] mypod -> ip-172-18-0-7.ec2.internal: LeastResourceAllocation, capacity 2000 millicores 8095694848 memory bytes, 39 volumes, total request 900 millicores 1782579200 memory bytes 1 volumes, score 6 I0807 19:33:17.810720 1 resource_allocation.go:69] mypod -> ip-172-18-0-4.ec2.internal: LeastResourceAllocation, capacity 2000 millicores 8095694848 memory bytes, 39 volumes, total request 600 millicores 1480589312 memory bytes 1 volumes, score 7 Here is the pick for origin: https://github.com/openshift/origin/pull/20603 Can you describe how to see BalanceAttachedNodeVolumes effect? for example I want to see log-output include volumes info. For a simple scenario,I create 3 pvc, and create a pod which only need one pvc. in this way, I only saw cpu and memory in log, but no volumn. Or volume should be other resource not pvc? (In reply to MinLi from comment #6) > Can you describe how to see BalanceAttachedNodeVolumes effect? for example > I want to see log-output include volumes info. > For a simple scenario,I create 3 pvc, and create a pod which only need one > pvc. in this way, I only saw cpu and memory in log, but no volumn. Or volume > should be other resource not pvc? Are you testing with a build that has this commit https://github.com/openshift/origin/pull/20603? Is there any update? I need read https://github.com/openshift/origin/pull/20603? carefully. Later reply to you https://github.com/aveshagarwal/origin/blob/d4a7fe442b583c8da4e46dbe833296759cb3de31/vendor/k8s.io/kubernetes/pkg/scheduler/algorithm/priorities/resource_allocation.go in above file and in func PriorityMap, the line after annotation“Check if the pod has volumes and this could be added to scorer function for balanced resource allocation” : if len(pod.Spec.Volumes) >= 0 && utilfeature.DefaultFeatureGate.Enabled(features.BalanceAttachedNodeVolumes) && nodeInfo.TransientInfo != nil ask: nodeInfo.TransientInfo mean what? How can I judge one node's nodeInfo.TransientInfo not null? Could you explain it in detail? Thank you. I can see volumn info in log in below version: oc v3.11.0-0.25.0 kubernetes v1.11.0+d4cacc0 features: Basic-Auth GSSAPI Kerberos SPNEGO verified! Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2652 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |