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

Improper handling on CPU request/limit in dashboard #21811

Closed
amisevsk opened this issue Nov 8, 2022 · 3 comments
Closed

Improper handling on CPU request/limit in dashboard #21811

amisevsk opened this issue Nov 8, 2022 · 3 comments
Labels
area/dashboard area/ts-workspace-client Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/ kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@amisevsk
Copy link
Contributor

amisevsk commented Nov 8, 2022

Describe the bug

When using devfiles that specify certain CPU limits/requests, Che returns invalid values for the CPU resource after adding the limit/request for the injected editor. Starting a workspace with a memory request of 4000m, for example, results in the injected devfile requesting 4030.0000000000005m instead of 4030m. This occurs because the injected CPU request is 30m, which internally gets parsed to

(4.0 + 0.03) * 1000

The CPU virtual resource in Kubernetes uses m as the smallest unit, so fractional m values are invalid.

Che version

7.56@latest

Steps to reproduce

  1. Start workspace from devfile https://gist.githubusercontent.com/l0rd/a200cc8a036a3564278e9bdb3e44cfe1/raw/2a9a7d1fb8275ce0c72407f3eed73d3fe4b03f2e/big-workspace.yaml
  2. After workspace is applied to the cluster, check the devfile in the dashboard for an invalid CPU request value.

Expected behavior

CPU request should be floored before returning to avoid fractional parts.

Runtime

other (please specify in additional context)

Screenshots

No response

Installation method

chectl/latest

Environment

Linux

Eclipse Che Logs

No response

Additional context

No response

@amisevsk amisevsk added kind/bug Outline of a bug - must adhere to the bug report template. area/dashboard area/ts-workspace-client Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/ labels Nov 8, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 8, 2022
@azatsarynnyy azatsarynnyy added severity/P2 Has a minor but important impact to the usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 8, 2022
@l0rd
Copy link
Contributor

l0rd commented Nov 10, 2022

I think this was reported downstream and originally planned to be addressed with the introduction of container contributions and deprecation/removal of the handler (but that's a good news that we already have a fix for it since contributions are not here yet).

@che-bot
Copy link
Contributor

che-bot commented May 9, 2023

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 9, 2023
@l0rd
Copy link
Contributor

l0rd commented May 9, 2023

Already fixed

@l0rd l0rd closed this as completed May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard area/ts-workspace-client Issues related to the Che workspace client https://github.com/eclipse/che-workspace-client/ kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants