Goglides Dev 🌱

Goglides Dev 🌱 is a community of amazing users

Shaping the future of IT, one connection at a time.

Create account Log in
Cover image for How to Resolve Jupyter Notebook Spawning Issues in Red Hat OpenShift Data Science, couldn't parse image reference ":py3.8-v1"
Balkrishna Pandey
Balkrishna Pandey

Posted on

How to Resolve Jupyter Notebook Spawning Issues in Red Hat OpenShift Data Science, couldn't parse image reference ":py3.8-v1"

Are you experiencing issues with spawning a Jupyter Notebook in your Red Hat OpenShift Data Science environment? Does the server get stuck at 96% and the notebook pod return a warning message? If you're facing this issue, I recently encountered the same problem in a newly created OpenShift cluster, and in this blog post, I will explain the process I used to resolve it.

In my installation, I encountered a problem where the progress was halted at 96%. The pods were stuck, as seen in the following output:

Stuck in 96%

127.0.0.1 $ oc get pods -n rhods-notebooks
NAME                        READY   STATUS             RESTARTS   AGE
jupyter-nb-kube-3aadmin-0   1/2     InvalidImageName   0          22h         5s
Enter fullscreen mode Exit fullscreen mode

When I described the pod, it returned an error message similar to the one below:

Warning  InspectFailed           0s (x2 over 2s)  kubelet                  Failed to apply default image tag ":py3.8-v1": couldn't parse image reference ":py3.8-v1": invalid reference format
  Warning  Failed                  0s (x2 over 2s)  kubelet                  Error: InvalidImageName
  Normal   Created                 0s               kubelet                  Created container 
Enter fullscreen mode Exit fullscreen mode

Image tag not found

Invalid Image

The warning message indicates that the default image tag could not be parsed correctly.

Solution:

RHODS uses pre-built notebooks that are pulled to the internal registry. If the registry is not running, it can cause issues with the spawning of Jupyter Notebooks. To resolve this issue, ensure the internal registry runs in the cluster before installing RHODS.
To check if the cluster has an image registry pod, run the following command in the terminal:

oc get pods -n openshift-image-registry
Enter fullscreen mode Exit fullscreen mode

You should receive output similar to the following:

Image registry

The image-registry pod is the one you're interested in. If it's not running, you need to deploy it. For a test cluster, you can use emptyDir, which is not recommended for a production cluster. To patch the config and deploy an image registry pod, run the following commands in the terminal:

oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"storage":{"emptyDir":{}}}}'
oc patch configs.imageregistry.operator.openshift.io cluster --type merge --patch '{"spec":{"managementState":"Managed"}}'
Enter fullscreen mode Exit fullscreen mode

Outcome:

After completing these steps, I redeployed OpenShift Data Science from scratch and successfully created a Jupyter Notebook.

Valid Image

Valid Jupyter UI

Discussion (0)