gristlabs / grist-omnibus

an opinionated Grist+Dex+Traefik package for first-time self-hosters
Apache License 2.0
43 stars 7 forks source link

Grist fails when gvisor not installed #16

Open martinoneutrino opened 3 months ago

martinoneutrino commented 3 months ago

Unfortunately with the change to gvisor as a default, grist becomes unavailable unless gvisor is installed.

While the /dex and /auth/login endpoints worked, the main application did not, resulting in a Bad Gateway response.

2024-03-09 14:06:40.598 - info: Sandbox stderr: Problem: Traceback (most recent call last):
Problem:   File "/grist/sandbox/grist/main.py", line 18, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.598 - info: Sandbox stderr: Problem:     import engine
Problem:   File "/grist/sandbox/grist/engine.py", line 24, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.599 - info: Sandbox stderr: Problem:     from autocomplete_context import AutocompleteContext, lookup_autocomplete_options, eval_suggestion sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.600 - info: Sandbox stderr: Problem:   File "/grist/sandbox/grist/autocomplete_context.py", line 14, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.600 - info: Sandbox stderr: Problem:     from table import UserTable
Problem:   File "/grist/sandbox/grist/table.py", line 11, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.601 - info: Sandbox stderr: Problem:     import docmodel sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.601 - info: Sandbox stderr: Problem:   File "/grist/sandbox/grist/docmodel.py", line 12, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.602 - info: Sandbox stderr: Problem:     import functions
Problem:   File "/grist/sandbox/grist/functions/__init__.py", line 6, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.602 - info: Sandbox stderr: Problem:   File "/grist/sandbox/grist/functions/math.py", line 17, in <module> sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
2024-03-09 14:06:40.603 - info: Sandbox stderr: Problem: ModuleNotFoundError: No module named 'roman' sandboxPid=115, flavor=gvisor, command=undefined, entryPoint=(default)
info [grist-omnibus] I think everything has started up now
info [grist-omnibus] Listening internally on 80/443, externally at https://...

I resolved this by switching to the unsandboxed version for docker run ... -e GRIST_SANDBOX_FLAVOR=unsandboxed

Please update the documentation to indicate that gvisor is now required by default.

almereyda commented 1 month ago

This issue also ccounts for the Grist image published from https://github.com/gristlabs/grist-core/blob/main/Dockerfile#L140 with https://github.com/gristlabs/grist-core/blob/main/.github/workflows/docker.yml when running on Docker without gVisor.

unsandboxed is also the default in there.