kubeflow / kubeflow/notebooks

[TASK] Extract All Container Statuses to State

Open
#212 8 comments 1 reaction 0 assignees View on GitHub
area/controller area/v2 kind/plan-task
Dominant language
No language data
Stars
84
Forks
149
Avg merge
5d 15h
Merged PRs (30d)
29

Description

As raised by @harshad16 in https://github.com/kubeflow/notebooks/pull/210, there is an issue with the `generateWorkspaceState()` method in the Workspace controller.

The issue is that we only look at the `main` container's status when checking for issues like `ImagePullBackOff`, but there could be multiple `container` or `initContainers` with issues preventing the Pod from becoming ready.

We need to update the following code so that it looks at all the container statuses in the Pod's `status.containerStatuses` and `status.initContainerStatuses` and looks for any which are in a "waiting" state with `CrashLoopBackOff` or `ImagePullBackOff` reasons, and then __aggregate__ the errors into the stateMessage.

https://github.com/kubeflow/notebooks/blob/6f147902d719baa23bc81c91425458857eff8c82/workspaces/controller/internal/controller/workspace_controller.go#L1051-L1076

__NOTE:__ because there could be different reasons for each one being in a waiting state, we should FIRST look for any `ImagePullBackOff` reasons and then only return all those as the state, then SECOND check for `CrashLoopBackOff` so we present the most pressing issues to the user in the state first.

Contributor guide

Open the contributing guide

Research direction

Start in workspaces/controller/internal/controller/workspace_controller.go at generateWorkspaceState(), using the linked lines as the entry point. Inspect how Pod status.containerStatuses and status.initContainerStatuses are checked, then verify that waiting ImagePullBackOff errors are aggregated first, followed by CrashLoopBackOff errors, in stateMessage.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.