Skip to content

Docs: are installs using the mirror? - #65

Open
dcmcand wants to merge 3 commits into
feat/pixi-mirrorfrom
feat/pixi-mirror-docs
Open

dcmcand wants to merge 3 commits into
feat/pixi-mirrorfrom
feat/pixi-mirror-docs

Conversation

@dcmcand

@dcmcand dcmcand commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Slice 4: The mirror holds up on a cluster, and operators can see it

This adds the operator docs for the pixi package mirror added in #63. It is part of #25, stacked on #63, and the diff is against feat/pixi-mirror.

Contracts touched: none.
Depends on: #63.

What changes

  • New admin page, "Package mirror":
    • Covers the settings, the egress namespace the mirror needs, and that the mirror is Kubernetes only.
    • Explains what happens when the mirror is down (pixi falls back to conda-forge and warns), lacks a package (404, no fallback), or its trust bundle is missing.
    • Gives two checks for whether installs use the mirror: pixi's retry warnings in the env-install log, and the pod's address in the mirror's request log. TAPAS_PIXI_MIRROR tells "no mirror" apart from "configured but not used".
    • Links Send the pixi mirror integration's signals to Nebari's OpenTelemetry collector #49 for showing fallbacks without reading logs.
  • Admin index: lists the new page.
  • Environments page (using/environments.md): one paragraph says installs may come from the cluster's mirror.

Validation

Step Result
astro build 43 pages built
No em dashes confirmed in the diff
Each claim checked against the code (values.yaml, config validation, pixienv, labels, contracts.md) no contradictions
Deploy to a real Nebari cluster with the mirror, then check the docs against a live fallback not run yet

…ls use it

A new admin page, Package mirror, covers the mirror settings and the
egress namespace they need, what happens when the mirror is down, lacks
a package (404, no fallback) or its trust bundle is missing, and two
checks for whether installs use it: pixi's retry warnings in the
env-install log, and the pod's address in the mirror's request log.
TAPAS_PIXI_MIRROR tells "no mirror" from "configured but not used".

The admin index lists the page, and the environments page says
installs may come from the cluster's mirror.

Refs #25
Refuse a mirror url with a user name or password, and stop repeating
the url in its errors, since it may hold a password. Refuse
environments.node unless environments.location is written as node.

Docs: the trust bundle replaces the pod's CA list, so it must hold the
public CAs; the mirror chart's callers value must list every namespace
Tapas runs pods in; a package missing upstream answers 500 and falls
back, while a late build answers 404 and does not. The example host is
the mirror chart's default Service name.

Add pixienv.NodeEnvsSubPath for the envs subPath and use it in the
tests that had compared against EnvsDir. Note in patterns.md that new
platform env names use TAPAS_ and are reserved one by one.

Refs #25
When the app exits 0 on the eviction's SIGTERM, the pod can end
Succeeded with no status reason or message (seen on EKS 1.37), so
ClassifyPod never matched it and the app showed AppNotAnswering instead
of EnvsFull or ScratchFull. Take the eviction message from the pod's
status when it says Evicted, and otherwise from the newest Evicted
event, then classify it by message as before.

Tests cover the event-only envs and scratch cases, a memory eviction
that matches neither, the status winning over an event, the newest
event winning, and the whole path through Observe and status.Derive.
The EnvsFull contract says where the line comes from.

Refs #25
@dcmcand

dcmcand commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Ran the cluster checks for this stack on an EKS 1.37 test cluster running Nebari and the OCI mirror pack, with location: node and the mirror on. Everything held up except one thing: an eviction for a full envs volume showed the wrong reason. cc65f01 fixes that.

The eviction: with node.sizeLimit: 1Gi, the kubelet evicted a JupyterLab pod and logged Usage of EmptyDir volume "envs" exceeds the limit "1Gi". as an event. But the app exited 0 on the SIGTERM, so the pod ended Succeeded with no status.reason or status.message. ClassifyPod only looked at the status, so the app sat on its health check and ended at AppNotAnswering. It now falls back to the newest Evicted event. ScratchFull had the same gap, and the same change covers it. Kind in e2e sets the status, which is why the tests never caught this. I haven't re-run it on the cluster yet; TestEnvsFullFromTheEvictedEventAlone builds the pod exactly as the cluster left it.

Check Result
Environments and cache on envs for apps and jobs; nothing in ~/.javo pass
App sees the environments read-only pass (touch fails). Landlock was off on this cluster, so the locked-agent case rests on agent-lock.test.mjs
Pod moved to another node reinstalls and comes back Ready pass, 49s
Switch node to home and back with an existing app pass both ways; ~/.javo/envs left alone. Installing into the home took about 4 minutes against about 40s on the node
App and job installs go through the mirror pass: 120 and 74 requests answered 200 from the pods' own IPs
pixi add in the app goes through the mirror over verified TLS pass
Mirror's namespace removed from the egress allow-list pass: nothing reached the mirror, pixi fell back, Ready in 129s against about 60s
Mirror down pass: WARN lines naming the mirror, then conda-forge, Ready in 65s
Trust bundle ConfigMap missing pass: pod starts, SSL_CERT_FILE unset, mirror logs unknown certificate authority, pixi falls back. The docs called this the likely behaviour; it's what happened
Docs section "Are installs using the mirror?" pass: its commands found the WARN lines on the fallback pod and none on the mirror pod. No Loki there, so that sentence is unchecked

Two numbers from the open questions. JupyterLab's environment is 906M on the node, so the default diskLimit stays. RStudio uses the rocker image and installs no pixi environment, so it has nothing to measure. With the Nebari bundle as SSL_CERT_FILE, openssl to pypi.org and github.com verifies and Python reaches pypi.org, so the bundle carries the public CAs as the docs say it must.

One thing we need to look at in the mirror pack: during the first install it answered 500 once, for a noarch repodata blob. pixi carried on and the install succeeded, but I don't know what caused it.

This branch has not been deployed

No deployments
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.

1 participant