-
Notifications
You must be signed in to change notification settings - Fork 66
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
[CodeSever] liveness and readiness probe times out due extension installation #421
Comments
Reference: #347 (comment) |
Reference: #347 (comment) |
Reference: #347 (comment) |
Reference: #347 (comment) |
@harshad16 @guimou @atheo89 I got it working with installing the vsx files from utils not in the entrypoint script, but in the containerfile, with an additonal argument --extensions-dir and persisting the installed extensions to a non-mounted, fixed directory. Custom image for your notebooks would be a way to go potentially, it was easy to accomplish with Guillome's image builder on odh contrib, just a new modified snippet, essentially. Since the container build happens on a machine with Internet access, it's a breeze, i.e. no explicit install of dependent extensions like jupyter notebooks cell renderer necessary, that happens automatically.
Added thought: Then, in the entrypoint script run-code-server.sh, a small modification giving bin/code-server the differing location of installed extensions:
working beautifully, I have multiple 10s of extensions availble baked-in. So no more liveness probe timeout issue on startup anymore as well. Minor issue still with Jupyter notebook plugin, it wants to create a tmp folder in the extension's location, which now is of course not easily possible. Should be fixable ... @atheo89 ah, settings.json is done this way, good
solution: workspaceFolder (implicit?) being /opt/app-root/src, which is writable and the actual working with files workspace area ...
Since an update quite some time ago (early 2023), ms-toolsai.jupyter can no longer properly launch a Jupyter kernel when Python and the notebook (Python) package are in scope because it tries to create a temp directory in its own extension directory and probably also microsoft/vscode-jupyter#13525 Lastly, to summarize, your work in finding out the commands, your comments on versioning for extensions, how to find out which extension is compatible with a given code-server version (engine entry in package.json of an extension) really helped me get my airgapped image take off / working. Thank you all. |
Partially of topic - should we have a tracking Jira issue for this as it should be our primary tool? |
Would you like me to provide my findings to ODH Contrib Workbench in the form of a pull request and i.e. an additional snippet / folder / IDE bundle in contrib terms https://github.com/opendatahub-io-contrib/workbench-images/tree/main/snippets/ides for VS Code Airgapped? I also updated pip to version 24.0, setuptools to version 69.1.0 and wheel to version 0.42.0 for base images. Location would be around here: https://github.com/opendatahub-io-contrib/workbench-images/tree/main/base/c9s In terms of the extensions that will be installed during container build time, I'll probably have a textfile with the base extensions you all use here, too, and another, optional text file for extensions the user can individually specifify by name. Language packs coder/code-server#6168 are not working correctly when installed airgapped currently, but everything else, including Jupyter, a .venv needed so Jupyter extension uses the system python packages and other settings make my airgapped VS Code work flawlessly. My thinking behind this is to first provide the working findings that in the end result in a custom podman ContainerFile and some minor modifications to the community, which could also yield feedback potentially. |
@shalberd this is amazing, thanks for checking on this 💯 |
This PR incorporate the changes that fix this issue |
nice, thank you |
There is a problem with this approach and current Notebooks when installing more than just these few extensions at runtime. The defaults for liveness and readiness probe times come from odh-dashboard, I think, when assembling the notebook CR.
Because installing extensions takes some time at the code-server-vs/api health check endpoint is not up and running until after all extensions install and the nginx http server is running, the container keeps re-starting without more than 5 or 6 extensions ever installed.
I solved this by patching the notebook CR to have a large initialDelaySeconds of 100, so then code server started.
What do you think? @guimou do you have an idea of how to circumvent this problem of premature container restart due to failing liveness probes when installing more than, say, 6 or 7 extensions?
Originally posted by @shalberd in #347 (comment)
The text was updated successfully, but these errors were encountered: