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

Resources Monitor Plugin doesn't work when devWorkspace engine is enabled #20800

Closed
Tracked by #20785 ...
svor opened this issue Nov 21, 2021 · 6 comments
Closed
Tracked by #20785 ...

Resources Monitor Plugin doesn't work when devWorkspace engine is enabled #20800

svor opened this issue Nov 21, 2021 · 6 comments
Assignees
Labels
area/plugins engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. 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. sprint/current
Milestone

Comments

@svor
Copy link
Contributor

svor commented Nov 21, 2021

Describe the bug

Resources Monitor plugin doesn't display information about the pod's resources when the workspace is running.

Che version

7.39@latest

Steps to reproduce

  1. Deploy che with dev-workspace engine
  2. Start any workspace
  3. Look at status bar where should be displayed an information from the Resources Monitor plugin

Expected behavior

Information about resources should be displayed in the status bar

Runtime

OpenShift

Screenshots

No response

Installation method

chectl/next

Environment

Linux

Eclipse Che Logs

Extension-Host:With stack trace: Error: Cannot get workspace pod. HttpError: HTTP request failed
    at ResourceMonitor.getWorkspacePod (/tmp/theia-unpacked/eclipse_che_resource_monitor_plugin.theia/lib/resource-monitor.js:67:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Extension-Host:Promise rejection not handled in one second: TypeError: Cannot read property 'attributes' of undefined , reason: TypeError: Cannot read property 'attributes' of undefined
Extension-Host:With stack trace: TypeError: Cannot read property 'attributes' of undefined
    at DevfileHandler.isRecommendedExtensionsDisabled (/tmp/theia-unpacked/eclipse_che_recommendations_plugin.theia/lib/devfile/devfile-handler.js:31:36)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RecommendationsPlugin.start (/tmp/theia-unpacked/eclipse_che_recommendations_plugin.theia/lib/plugin/recommendations-plugin.js:47:26)

Additional context

The problem could be related to a mechanism which is used in ResMonitor plugin to get an information about workspace's pod. As an alternative we can try to reuse k8s-devfile-service api.

But it's important to check that it'll work when devWS engine is not enabled.

@svor svor added kind/bug Outline of a bug - must adhere to the bug report template. sprint/next team/plugins engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. area/plugins labels Nov 21, 2021
@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 21, 2021
@svor svor added severity/P1 Has a major impact to 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 21, 2021
@svor svor changed the title Resources Monitor Plugin doesn't work when devWorkspace engine is enable Resources Monitor Plugin doesn't work when devWorkspace engine is enabled Dec 1, 2021
@svor svor self-assigned this Dec 1, 2021
@svor
Copy link
Contributor Author

svor commented Dec 3, 2021

I've fixed a problem with reading workspace pod information by setting right name of workspace's namespace.
The next problem is related to workspace SA, it's not possible to read metrics:

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods.metrics.k8s.io "workspace4f756f319b3f4555-5f8b6bdff4-ktp5k" is forbidden: User "system:serviceaccount:opentlc-mgr-che:workspace4f756f319b3f4555-sa" cannot get resource "pods" in API group "metrics.k8s.io" in the namespace "opentlc-mgr-che"","reason":"Forbidden","details":{"name":"workspace4f756f319b3f4555-5f8b6bdff4-ktp5k","group":"metrics.k8s.io","kind":"pods"},"code":403}

@amisevsk
Copy link
Contributor

amisevsk commented Dec 3, 2021

PR devfile/devworkspace-operator#695 adds get/list/watch permissions for pod metrics in the workspace ServiceAccount.

@svor
Copy link
Contributor Author

svor commented Dec 8, 2021

@svor svor closed this as completed Dec 8, 2021
@svor svor reopened this Dec 8, 2021
@svor svor mentioned this issue Dec 20, 2021
15 tasks
@benoitf
Copy link
Contributor

benoitf commented Dec 21, 2021

moving issue to 7.42 milestone as this issue is part of the endgame

@svor
Copy link
Contributor Author

svor commented Dec 22, 2021

depends on devworkspace-operator v0.12.0 devfile/devworkspace-operator#695

@svor svor mentioned this issue Jan 11, 2022
17 tasks
@svor svor modified the milestones: 7.42, 7.43 Jan 12, 2022
This was referenced Jan 24, 2022
@svor svor modified the milestones: 7.43, 7.44 Feb 1, 2022
@svor
Copy link
Contributor Author

svor commented Feb 4, 2022

@svor svor closed this as completed Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins engine/devworkspace Issues related to Che configured to use the devworkspace controller as workspace engine. 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. sprint/current
Projects
None yet
Development

No branches or pull requests

4 participants