[
https://issues.apache.org/jira/browse/YUNIKORN-3206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054178#comment-18054178
]
Wilfred Spiegelenburg commented on YUNIKORN-3206:
-------------------------------------------------
The calculations in the {{checkInitContainerRequest()}} are causing the issue.
Processing has become complex with the native sidecars and the container
resizing.
The issue seems to be in how we calculate the size of the init container:
{code:java}
if isSideCarContainer(&c) {
sideCarRequests = Add(sideCarRequests, ICResource)
}
ICResource = Add(ICResource, sideCarRequests) {code}
That adds the ICresource twice. The incorrect calculation only shows up with in
comparison large init containers and small real containers.
In the example in the description any real container of 1024M or larger would
have masked the issue.
> Pod resource calculation incorrect with native sidecars
> -------------------------------------------------------
>
> Key: YUNIKORN-3206
> URL: https://issues.apache.org/jira/browse/YUNIKORN-3206
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: shim - kubernetes
> Reporter: Wilfred Spiegelenburg
> Assignee: Wilfred Spiegelenburg
> Priority: Major
>
> The calculation of the total pod size is incorrect when the pod contains
> native sidecars.
> Pod configuration:
> {code:java}
> initContainers:
> - name: ic1
> resources: { memory: 1024Mi }
> - name: ic2
> resources: { memory: 1024Mi }
> restartPolicy: Always
> containers:
> - name: app1
> resources: { memory: 512Mi } {code}
> Expected:: 1536 MiB
> YuniKorn calculates: 2048 MiB
> Overcount: 512 MiB per pod
> The issue is linked to the containers with the restartPolicy tagged onto it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]