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

Kale couldn't use current notebook image if there are multiple containers in the pod #434

Open
akrava opened this issue Jul 15, 2022 · 1 comment · May be fixed by #435
Open

Kale couldn't use current notebook image if there are multiple containers in the pod #434

akrava opened this issue Jul 15, 2022 · 1 comment · May be fixed by #435

Comments

@akrava
Copy link

akrava commented Jul 15, 2022

I've got latest version of Kale extension in the jupyterhub notebook. The pod of the my botebook has got two containers: app and istio-proxy. When I launch pipeline I see that current notebook image is not used. Here is the logs:

2022-07-15 11:02:41 run:83 [[DEBUG]] [TID=dqxkq9qwb0] [] Decoding ctx of RPC function 'nb.get_base_image'
2022-07-15 11:02:41 run:95 [[DEBUG]] [TID=dqxkq9qwb0] [/home/dev1/candies_sharing.ipynb] Decoding kwargs of RPC function 'nb.get_base_image'
2022-07-15 11:02:41 run:104 [[DEBUG]] [TID=dqxkq9qwb0] [/home/dev1/candies_sharing.ipynb] Importing RPC function 'nb.get_base_image'
2022-07-15 11:02:41 run:113 [[INFO]] [TID=dqxkq9qwb0] [/home/dev1/candies_sharing.ipynb] Executing RPC function 'get_base_image()'
2022-07-15 11:02:41 run:124 [[ERROR]] [TID=dqxkq9qwb0] [/home/dev1/candies_sharing.ipynb] RPC function 'get_base_image' raised an unhandled exception
Traceback (most recent call last):
  File "/opt/miniconda/lib/python3.8/site-packages/kale/rpc/run.py", line 116, in run
    result = func(request, **kwargs)
  File "/opt/miniconda/lib/python3.8/site-packages/kale/rpc/nb.py", line 87, in get_base_image
    return podutils.get_docker_base_image()
  File "/opt/miniconda/lib/python3.8/site-packages/kale/common/podutils.py", line 272, in get_docker_base_image
    container_name = get_container_name()
  File "/opt/miniconda/lib/python3.8/site-packages/kale/common/podutils.py", line 136, in get_container_name
    raise RuntimeError("No container names left. Could not infer the name"
RuntimeError: No container names left. Could not infer the name of the running container.
@akrava akrava linked a pull request Jul 15, 2022 that will close this issue
@akrava
Copy link
Author

akrava commented Jul 15, 2022

In this block of code https://github.com/kubeflow-kale/kale/blob/master/backend/kale/common/podutils.py#L114-L125 I've found a typo in the if statement:

    if len(candidates) > 0:
        raise RuntimeError("No container names left. Could not infer the name"
                           " of the running container.")

It should be if len(candidates) == 0: I guess.

That's why I've created PR in order to fix it: #435

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

Successfully merging a pull request may close this issue.

1 participant