Repository navigation
Conversation
OpenTela keeps its identity key under ~/.config/opentela unless --config-dir says otherwise. $HOME is shared by all nodes, so every node of a multi-node replica announced the same peer ID and wrote the same ~/.ocfcore DB: stale file handle errors and a gateway 503 'No provider found'. /tmp/opentela-$JOB gives each node its own fresh key per job.
--config-dir also moves where cfg.yaml is read. Copy the user's own ~/.config/opentela/cfg.yaml (or the legacy ~/.config/ocf one OpenTela still falls back to) in first, so their settings stay and only the identity is new.
|
I didn't got the idea of the PR. I think the peer ID you are pointing to is the bootstrap peer, which indeed is fixed across the system. Could you please elaborate a bit more? Maybe @xzyaoi can give us an input here as well. |
I wanted to evaluate chonk/megachonk which requires us to use multiple nodes for model launch now. This caused issues because every node ends up with the same OpenTela identity and this raises an error. This PR attempts to give each node its own identity. Or is this feature already supported and I missed it? Probably there is also a cleaner way of doing it upstream... I am currently using this PR branch for evals and it works now. |
I think if you have multiple slurm jobs, each one of them should get a different $HOME, if you do not mount the same? I recall I have a setup of multiple concurrent slurm job and each use a different $HOME. But yes, if they conflict, it is an issue. IIRC you can also provide a --seed so they will generate different ids. |
The issue for me arises already when submitting 1 slurm job using multiple nodes. Then $HOME is the same for all nodes. Opentela looks in the shared $HOME directory and the ID's for all nodes become the same. So you suggest using a container which redirects $HOME ? This PR redirects to /tmp |
Yes, I think this is the right. |
Withdrawing approval pending review feedback (router/head identity sharing, config-dir seeding).
|
Thanks for the thorough diagnosis. The root cause is right, and the fix works for the multi-node replica case. I've withdrawn my earlier approval until the points below are settled. 1. Router and replica-0 head may still share an identity
2. Code shape 3. Upstream follow-up Smaller notes
|
…e it on exit OpenTela writes $HOME/.ocfcore/ocfcore.<peer id>.db and only clears its own id's database on start. With a fresh identity per job none was ever cleared, and they filled the 50 GB home quota (19 GB in 52 databases), after which OpenTela crashed on start with 'disk quota exceeded'. OpenTela now runs with HOME set to /tmp/opentela-$SLURM_JOB_ID, the subprocess gets the real HOME back, and the rank script removes the dir on exit.
AryanAhadinia
left a comment
There was a problem hiding this comment.
Automated review
This repository has no .github/review-criteria.yml on main, so there are no review criteria to check this PR against.
|
@xzyaoi @robmsmt @AryanAhadinia I made a PR into upstream opentela repo to make a cleaner fix (per-node identity): I smoke-tested it on Clariden (2 nodes, shared $HOME, deployed dev build + the change): distinct peer IDs, routing between the nodes works, nothing written to $HOME, DBs removed on exit. |
|
Mel we can close this now because we merged the changes into opentela I believe? |
Yes, resolved upstream: |
…of a per-job HOME eth-easl/OpenTela#68 (v0.2.7) added --ephemeral-identity and --datadir to `otela start`, so the per-job HOME override, --config-dir and cfg.yaml copy are no longer needed. Each OpenTela process gets an in-memory identity and a node-local database directory of its own (mktemp, removed on exit), so nodes sharing a $HOME, and two OpenTela processes on one node, no longer share a peer ID or database.
|
@robmsmt sorry, only upstream fix is done, this is still relevant. Could you pls have a look? |
|



Problem
OpenTela loads its identity key from
~/.config/opentela/keys/idand keeps its peer database at~/.ocfcore/ocfcore.<peer id>.db. On Clariden$HOMEis one shared filesystem, so every node of a multi-node replica announces the same peer ID and writes the same database. The nodes race to create the file: the loser getsfile exists/stale file handle, and OpenTela crashes (a nil-pointer panic in the Badger datastore) or the gateway answers 503 "No provider found". It is intermittent, so some launches get through.Change
Both
$OPENTELA_BIN startinvocations (_opentela_wrap,_opentela_wrap_metrics_only) now pass the flags eth-easl/OpenTela#68 added (release v0.2.7):--ephemeral-identity: an in-memory peer identity per process, no key file read or written.--datadir "$OPENTELA_DATADIR": the peer database (and usage store) go to a node-local directory made withmktemp -d /tmp/opentela-${SLURM_JOB_ID}.XXXXXXinstead of the shared~/.ocfcore. One directory per OpenTela process, so two processes on a node (an sglang router and the replica's head) do not share a database. The rank script removes it on exit.This replaces the earlier version of this PR (a per-job
HOME,--config-dirand acfg.yamlcopy): noHOMEoverride and no config copy are needed, and the user'scfg.yamlis read from its normal place.Requirement
An OpenTela binary with
--ephemeral-identityand--datadir(v0.2.7). Theprodbinary in opentela-share on Clariden has both flags (checked withotela start --help). I did not check thedevchannel.Side effects
Tested
tests/unitpasses (462 tests);ruff checkandruff formatare clean. New tests check that every rendered head and follower script has the flags and no--config-dirorHOMEoverride, and run the wrapper against a fakeotelato check the datadir is per process, outside$HOME, and removed on exit.highprio) with this branch's rendering. No panic orfile existson either node; the two nodes announced different peer IDs; the head registeredhas_service: true, status: readyand the followerhas_service: false(metrics-only, as before); a chat request through the serving API returned a reply; no new directories appeared in the shared~/.ocfcore.