Skip to content

docs: add sandbox logs guide (cubecli cubebox logs) - #2

Open
ls-ggg wants to merge 2 commits into
masterfrom
ls-ggg/sandbox-logs-guide
Open

docs: add sandbox logs guide (cubecli cubebox logs)#2
ls-ggg wants to merge 2 commits into
masterfrom
ls-ggg/sandbox-logs-guide

Conversation

@ls-ggg

@ls-ggg ls-ggg commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Introduce a new guide page in both English and Chinese explaining how to retrieve sandbox and template build logs via cubecli cubebox logs.

Key points covered:

  • WIP notice: log retrieval is actively iterated; current interface is temporary
  • cubecli cubebox logs reads the container init-process stdout/stderr; must be run on the node (accesses Cubelet mount namespace)
  • --tpl flag for template build logs (host filesystem, no ns entry)
  • Flag reference: --stderr, --all, --tail N, --head N
  • Log file paths for sandbox vs template
  • Scope: init-process only; envd sub-task logs retrieved via E2B SDK (on_stdout / on_stderr callbacks), refer to E2B SDK docs
  • Limitations: no --follow, logs deleted with sandbox

Add nav entries in config.mjs under the Operations section (en & zh).

…encentCloud#566)

* fix(sandbox): propagate create-time env vars to envd

Create-time env vars were dropped during sandbox creation, so envd-backed
command execution (e.g. commands.run) could not see them.

Forward env vars from CubeAPI into CubeMaster, serialize them into an
internal annotation, and have cubelet initialize envd via its /init
data-plane endpoint after sandbox startup. Gate on the propagated envd
capability signal (cube.master.components.envd.version) and fail fast when
injection is requested on a template without it.

Scope is limited to the envd data-plane init path; container-level startup
env refresh is intentionally not included.

Add focused tests across CubeAPI/CubeMaster/cubelet and a quickstart example.

Signed-off-by: zhengyilei <zheng_yilei@qq.com>
Co-authored-by: jinlong <jinlong@tencent.com>

* fix(cubelet): fall back when envd support annotation is missing

Keep create-time env var injection backward-compatible for templates built
before envd capability propagation.

When create_time_env_vars are requested and the template lacks the envd support
annotation, probe the default envd init endpoint with bounded retry instead of
rejecting upfront. If init still fails, return an explicit error instead of
silently dropping the env vars.

Also surface missing-annotation context in failure messages and add focused
tests for the fallback path.

Signed-off-by: zhengyilei <zheng_yilei@qq.com>

---------

Signed-off-by: zhengyilei <zheng_yilei@qq.com>
Co-authored-by: jinlong <jinlong@tencent.com>
@ls-ggg
ls-ggg force-pushed the ls-ggg/sandbox-logs-guide branch from 9f6ed80 to e0392a0 Compare July 1, 2026 06:27
Introduce a new guide page in both English and Chinese explaining how
to retrieve sandbox and template build logs via cubecli logs.

Key points covered:
- WIP notice: log retrieval is actively iterated; current interface is
  temporary
- cubecli logs reads the container init-process stdout/stderr;
  must be run on the node (accesses Cubelet mount namespace)
- --tpl flag for template build logs (host filesystem, no ns entry)
- Flag reference: --stderr, --all, --tail N, --head N
- Log file paths for sandbox vs template
- Scope: init-process only; envd sub-task logs retrieved via E2B SDK
  (on_stdout / on_stderr callbacks), refer to E2B SDK docs
- Limitations: no --follow, logs deleted with sandbox

Add nav entries in config.mjs under the Operations section (en & zh).

Signed-off-by: coolli <335814617@qq.com>
@ls-ggg
ls-ggg force-pushed the ls-ggg/sandbox-logs-guide branch from e0392a0 to 48a958c Compare July 1, 2026 06:29
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 this pull request may close these issues.

2 participants