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

Unable to ignore FailedScheduling event #1046

Closed
AObuchow opened this issue Feb 16, 2023 · 0 comments
Closed

Unable to ignore FailedScheduling event #1046

AObuchow opened this issue Feb 16, 2023 · 0 comments
Assignees
Milestone

Comments

@AObuchow
Copy link
Collaborator

Description

#978 added an extra check for the PodUnschedulable condition, for cases when pod events were not reliable to report issues with the workspace deployment. That fix was made obsolete by 255d699.

Now it's come to my attention that, if you try and add the FailedScheduling event to the list of ignoredUnrecoverableEvents in the DWOC, the PodUnschedulable condition will still be caught, and the workspace will fail.

How To Reproduce

  1. Add FailedScheduling to the ignoredUnrecoverableEvents in the DWOC:
apiVersion: controller.devfile.io/v1alpha1
config:
  routing:
    clusterHostSuffix: 192.168.39.246.nip.io
    defaultRoutingClass: basic
  workspace:
+    ignoredUnrecoverableEvents:
+    - FailedScheduling
    imagePullPolicy: Always
  1. Start a workspace that causes a FailedScheduling event, e.g. by requesting more CPU than the cluster can provide:
kind: DevWorkspace
apiVersion: workspace.devfile.io/v1alpha2
metadata:
  name: theia-next-high-cpu
spec:
  started: true
  template:
    projects:
      - name: web-nodejs-sample
        git:
          remotes:
            origin: "https://github.com/che-samples/web-nodejs-sample.git"
    components:
      - name: theia
        plugin:
          uri: https://che-plugin-registry-main.surge.sh/v3/plugins/eclipse/che-theia/latest/devfile.yaml
          components:
            - name: theia-ide
              container:
                env:
                  - name: THEIA_HOST
                    value: 0.0.0.0
                memoryRequest: 2Gi
                memoryLimit: 16Gi
                cpuRequest: 4000m
                cpuLimit: 8000m
    commands:
      - id: say-hello
        exec:
          component: theia-ide
          commandLine: echo "Hello from $(pwd)"
          workingDir: ${PROJECTS_ROOT}/project/app
  1. See that the workspace still fails, stating the pod is unschedulable:
$ kubectl get dw -n $NAMESPACE -w
NAME                  DEVWORKSPACE ID             PHASE      INFO
theia-next-high-cpu   workspace544c789045e040d0   Failed   Pod is unschedulable: 0/1 nodes are available: 1 Insufficient cpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod.

Expected behavior

The workspace does not fail immediately, and should time out instead.

@AObuchow AObuchow self-assigned this Feb 16, 2023
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Feb 17, 2023
AObuchow added a commit to AObuchow/devworkspace-operator that referenced this issue Feb 17, 2023
This reverts commit 0cad9a0.

Fix devfile#1046

Signed-off-by: Andrew Obuchowicz <[email protected]>
amisevsk pushed a commit to amisevsk/devworkspace-operator that referenced this issue Feb 22, 2023
This reverts commit 0cad9a0.

Fix devfile#1046

Signed-off-by: Andrew Obuchowicz <[email protected]>
(cherry picked from commit 4aa1755)
amisevsk pushed a commit that referenced this issue Feb 22, 2023
This reverts commit 0cad9a0.

Fix #1046

Signed-off-by: Andrew Obuchowicz <[email protected]>
(cherry picked from commit 4aa1755)
@amisevsk amisevsk added this to the v0.20.x milestone Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants