the customer has a process wrapper read the values from: /sys/fs/cgroup/memory/memory.limit_in_bytes, /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes and calculates Xms and Xmx based on the highest value of those two and JAVA_MAX_MEM_RATIO. It Works on opc 3.11 but in 4.3 the memory.memsw.limit_in_bytes value does not reflect the limits set in the Deployment Config. ============================================================== extraction from the deployment config for the pod: $ oc get dc test-sunny -oyaml | yq .spec.template.spec.containers[0].resources { "limits": { "cpu": "1", "memory": "1Gi" }, "requests": { "cpu": "500m", "memory": "512Mi" } ============================================================== oc get dc test-sunny -oyaml | yq .spec.template.spec.containers[0].env [ { "name": "POD_NAME", "valueFrom": { "fieldRef": { "apiVersion": "v1", "fieldPath": "metadata.name" } } }, { "name": "POD_NAMESPACE", "valueFrom": { "fieldRef": { "apiVersion": "v1", "fieldPath": "metadata.namespace" } } }, { "name": "JAVA_MAX_MEM_RATIO", "value": "40" } ] ============================================================== case ID: 02616909
I am setting up a PR built on top of the attached PR that will implement this in master. Once that's done, I'll backport it to get it into 4.3
a PR to fix this has merged into 4.5. I am currently in the process of backporting to 4.4 and 4.3
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-2020:2409