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

CPU request / limit in the plugin meta.yaml is not correctly translated on the k8s level #18484

Closed
1 task
ibuziuk opened this issue Nov 30, 2020 · 3 comments · Fixed by #18527
Closed
1 task
Assignees
Labels
area/che-server kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Milestone

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Nov 30, 2020

Describe the bug

CPU request in the plugin meta.yaml is not correctly translated on the k8s level

e.g. cpuRequest: "30m" is translated to 30 cores (should be either 30m or 0.03):

Che version

  • 7.22.0

Steps to reproduce

devfile to reproduce:

metadata:
  name: test-cpulimit22qho
attributes:
  persistVolumes: 'false'
components:
  - type: cheEditor
    reference: >-
      https://gist.githubusercontent.com/sparkoo/cb5105fa1f01f29bf73eb238f6ae622f/raw/090062b9eca6a25ef5226d566ef9626d8a2ca012/theia_meta.yaml
    alias: che-theia
apiVersion: 1.0.0

Details in the

Expected behavior

cpuRequest: "30m" is transated to either 30m or 0.03

Runtime

  • Openshift 4.6
@ibuziuk ibuziuk added kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. area/plugins area/plugin-registry labels Nov 30, 2020
@skabashnyuk
Copy link
Contributor

. cpuRequest: "30m" is translated to 30 cores (should be either 30m or 0.003):

@ibuziuk can you explain you math how to get 0.003 from 30m?

It's a bit different from what I can see in code
https://github.com/eclipse/che/blob/75889e8c33601e8986e75bad74456cff39e511c0/infrastructures/kubernetes/src/test/java/org/eclipse/che/workspace/infrastructure/kubernetes/util/KubernetesSizeTest.java#L50

@skabashnyuk
Copy link
Contributor

From what I can see https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/#cpu-units
100m=0.1 and 30m=0.03. Yes definitely 30m!=30.

@ibuziuk
Copy link
Member Author

ibuziuk commented Nov 30, 2020

sorry, typo - updated description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-server kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants