You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(onboard): make the Ollama upgrade reach the required version (#9284)
<!-- markdownlint-disable MD041 -->
## Summary
<!-- 1-3 plain sentences: what changes and why. Describe
before-and-after behavior when it applies. Follow the NemoClaw Writing
Guide: https://github.com/NVIDIA/NemoClaw/blob/main/WRITING.md. Do not
add unrelated prose cleanup. -->
A Linux Ollama upgrade ran the official installer without naming a
version, so on a host whose latest release is below the required minimum
the install reported success, the version never moved, and
non-interactive onboarding exited 1 while advising a daemon restart that
could not help. The upgrade now asks the installer for the minimum
version by name, reads the binary's own version separately from the
daemon's, restarts the service even when the current listener is already
loopback-only, and names which side is stale in the failure. When the
installed binary is already current and only the daemon is stale,
recovery restarts the daemon without replacing or downgrading that
binary.
## Related Issue
<!-- Fixes #NNN or Closes #NNN. Remove this section if none. -->
Fixes#9276
## Changes
<!-- List concrete changes. If this adds an abstraction, configuration,
fallback, migration, or compatibility path, name its current requirement
and consumer, explain why a direct change is insufficient, and identify
the test that protects it. -->
- `runOfficialInstallScript` in
`src/lib/onboard/install-ollama-linux.ts` prefixes the installer with
`OLLAMA_VERSION=<minimum>` when upgrade recovery must install or replace
a stale binary. A fresh install stays unpinned and takes the latest
version. When an installed binary already meets the floor and only the
daemon is stale, Linux recovery skips the installer and restarts that
daemon, preventing a downgrade.
- `getInstalledOllamaVersion` in `src/lib/inference/ollama-version.ts`
prefers the `client version is X` line. `ollama --version` reports the
version of the daemon it can reach and prints the client's own version
only when the two differ, so the previous first-match read returned the
daemon's version for both probes and collapsed the stale-binary and
stale-daemon cases the install menu distinguishes.
- `ensureOllamaLoopbackSystemdOverride` in
`src/lib/onboard/ollama-systemd.ts` takes an `isUpgrade` flag, passed by
`installOllamaSystem`. The existing shortcut that skips the drop-in
rewrite when the active listener is already loopback-only also skips the
service restart, which an upgrade needs to move the daemon onto the new
binary, so the flag refuses that shortcut and reports the missing sudo
instead.
- `assertOllamaUpgradeApplied` in
`src/lib/onboard/ollama-install-menu.ts` now requires both the daemon
and installed binary to be readable and at or above the minimum. It
selects remediation from both probes: restart when the binary is current
but the daemon is stale, run the pinned installer when the binary is
stale, check the binary and `PATH` when only its version is unreadable,
and check installation and daemon state when neither version is
readable.
- `docs/inference/set-up-ollama.mdx` records the pinned upgrade, the
daemon-only restart that preserves a current binary, the `ollama
--version` reporting behavior, the restart requirement, and the three
failure outcomes.
## Type of Change
- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)
## Quality Gates
<!-- Check one tests line and one docs line. Check other lines when
applicable. Add every requested justification or approval reference. -->
- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: security review and
requested corrections recorded in
#9284 (review)
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:
## Documentation Writer Review
<!-- Required for code and documentation changes after the changes and
applicable validation are complete. Keep one review checkbox and one
instance of each visible or hidden field. For Evidence, list changed
documentation paths. For documentation-only changes, also state that the
writing rules and documentation style were reviewed. For other results,
explain why no documentation change is needed or why the review is
blocked. For Agent, use a consistent product and surface name, such as
Codex Desktop, Codex CLI, Claude Code, or Cursor. After committing all
review changes, put `git rev-parse --short HEAD` and `git rev-parse
--short HEAD:AGENTS.md` in the hidden metadata below. Rerun the review
and refresh that metadata after any new commit. This receipt is advisory
during the data-collection pilot. -->
- [x] Documentation writer subagent reviewed the completed changes
- Result: `docs-updated`
- Evidence: `docs/inference/set-up-ollama.mdx`; reviewed terminology,
structure, voice, Linux installer and restart behavior claims,
user-visible remediation, behavior test titles, and the OpenClaw and
Hermes generated variants against the implementation and tests.
- Agent: Codex Desktop
<!-- docs-review-head-sha: 0834862 -->
<!-- docs-review-agents-blob-sha: b9fb6a9 -->
## DGX Station Hardware Evidence
<!-- Required only when scripts/prepare-dgx-station-host.sh changes.
Maintainers must review the linked evidence before approving or merging.
This is human-reviewed evidence, not authenticated hardware provenance.
Exceptional bypasses use existing repository governance and must be
documented on the PR. -->
- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:
## Verification
<!-- Check each applicable item only when supported by the requested
evidence. Run targeted tests once per relevant change set and rerun
after later edits or hook autofixes that can affect the tested behavior.
Do not rerun hook-covered checks. -->
- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification: `npx
vitest run src/lib/inference/ollama-version.test.ts
src/lib/onboard/ollama-install-menu.test.ts
src/lib/onboard/install-ollama-linux-upgrade.test.ts
src/lib/onboard/install-ollama-linux.test.ts
src/lib/onboard/ollama-systemd.test.ts
src/lib/onboard/setup-nim-ollama.test.ts
test/onboard-ollama-upgrade-version-floor.test.ts
test/onboard-selection.test.ts` — 8 files, 174 tests passed. Also `npm
run typecheck`, `npm run typecheck:cli`, `npm run lint`, `npm run docs`,
`npm run test-size:check`, and `npm run validate:pr` passed.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [x] `npm run docs` builds without warnings (doc changes only)
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)
---
<!-- DCO sign-off is required in this PR description, and every commit
must appear as Verified in GitHub. Run: git config user.name && git
config user.email -->
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Ollama upgrades now install the required minimum version, while fresh
installations continue to use the latest release.
* Existing newer binaries can recover stale services without
reinstalling.
* Upgrade validation checks both the running service and installed
binary, with clearer guidance when either is outdated or unavailable.
* Upgrades fail safely when the service cannot restart onto the newly
installed version.
* Version detection correctly prioritizes the installed client version.
* **Documentation**
* Updated Linux Ollama setup guidance to explain version-pinned
upgrades, required permissions, and validation behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Co-authored-by: Prekshi Vyas <prekshiv@nvidia.com>
Copy file name to clipboardExpand all lines: docs/inference/set-up-ollama.mdx
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,12 +31,21 @@ The wizard checks `ollama --version` and `/api/version` on port `11434` independ
31
31
If NemoClaw detects an installed CLI or local running daemon but cannot read its version, onboarding uses the upgrade path instead of reusing it.
32
32
33
33
On macOS, the wizard uses `brew upgrade ollama` for the platform upgrade path.
34
-
On Linux, the wizard uses the official `https://ollama.com/install.sh` path.
34
+
On Linux, the wizard uses the official `https://ollama.com/install.sh` path and asks it for `0.32.9` by name when the installed binary is stale, because the version the installer calls latest is below the minimum on some hosts.
35
+
If the installed binary is already at or above the minimum and only the daemon is stale, the wizard restarts the daemon without running the installer or replacing the newer binary.
35
36
Linux upgrades use the sudo-driven system path because a user-local fallback would leave an existing system daemon serving the stale binary.
36
37
If sudo is unavailable in a non-interactive run, rerun interactively or upgrade Ollama manually.
37
-
38
-
After an upgrade, NemoClaw probes the running daemon again.
39
-
If the version remains below the minimum or cannot be read, interactive onboarding returns to provider selection, and non-interactive onboarding exits.
38
+
An upgrade also needs sudo to restart the service onto the new binary, so it does not accept an already-loopback-only daemon as a reason to skip that step.
39
+
A fresh install takes the latest version.
40
+
41
+
After an upgrade, NemoClaw probes the running daemon and the installed binary again.
42
+
`ollama --version` reports the version of the daemon it can reach, so NemoClaw reads the binary's own version from the client-version line that the command prints when the two differ.
43
+
Both versions must be readable and at or above `0.32.9` before onboarding accepts the upgrade.
44
+
If either version is below the minimum or cannot be read, interactive onboarding returns to provider selection, and non-interactive onboarding exits.
45
+
The failure identifies each stale or unreadable version.
46
+
A binary at or above the minimum means the service still serves the old one and needs a restart, while a binary below it means the installer did not deliver the required version on that host.
47
+
When only the binary cannot be read, the failure asks you to verify the installed Ollama binary before you retry.
48
+
When neither side can be read, the failure asks you to check that Ollama is installed and running before you retry.
40
49
Fresh installs skip this second probe because the bundled installers provide a daemon at or above the minimum.
41
50
42
51
The version gate does not apply to Windows-host Ollama reached from Docker Desktop through `host.docker.internal`.
0 commit comments