[PR #14788] fix: rollback blobs if manifest creation fails during pull #77132

Open
opened 2026-05-05 09:49:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14788
Author: @alamrezoanul
Created: 3/11/2026
Status: 🔄 Open

Base: mainHead: fix-manifest-permission-error


📝 Commits (4)

  • 8dcad2f fix: improve error handling when manifest write fails due to permissions
  • 35ac8c4 fix: improve error message when manifest write fails due to permissions
  • 9681aa8 fix: rollback blobs if manifest creation fails during pull
  • 69e39bf fix: formatting and tests

📊 Changes

11 files changed (+120 additions, -63 deletions)

View changed files

📝 server/images.go (+17 -5)
server/pull_manifest_permission_test.go (+46 -0)
📝 x/imagegen/mlx/mlx_test.go (+4 -4)
📝 x/imagegen/models/flux2/flux2.go (+9 -9)
📝 x/imagegen/models/flux2/rope.go (+18 -18)
📝 x/imagegen/models/flux2/scheduler.go (+1 -1)
📝 x/imagegen/nn/nn.go (+2 -2)
📝 x/imagegen/safetensors/safetensors.go (+0 -1)
📝 x/imagegen/tokenizer/tokenizer.go (+4 -4)
📝 x/imagegen/tokenizer/tokenizer_test.go (+13 -13)
📝 x/imagegen/vae/tiling.go (+6 -6)

📄 Description

Fixes #14762

If manifest creation fails due to filesystem permission errors,
downloaded blobs may remain without a manifest. This leaves the
model in a partially installed state where later commands fail
with "pull model manifest: file does not exist".

This change rolls back partially downloaded blobs when manifest
creation fails, ensuring the system remains in a consistent state.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14788 **Author:** [@alamrezoanul](https://github.com/alamrezoanul) **Created:** 3/11/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-manifest-permission-error` --- ### 📝 Commits (4) - [`8dcad2f`](https://github.com/ollama/ollama/commit/8dcad2f708dc8fc2236f1ad6ace2b3225c8f9903) fix: improve error handling when manifest write fails due to permissions - [`35ac8c4`](https://github.com/ollama/ollama/commit/35ac8c4f1c8c3779d4e650a09e9dcab81df3209b) fix: improve error message when manifest write fails due to permissions - [`9681aa8`](https://github.com/ollama/ollama/commit/9681aa804df7f4b6d360bee19e4d8c8a43d5e28d) fix: rollback blobs if manifest creation fails during pull - [`69e39bf`](https://github.com/ollama/ollama/commit/69e39bf85ab463f4a91d7e366ed3b540602f4bf8) fix: formatting and tests ### 📊 Changes **11 files changed** (+120 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `server/images.go` (+17 -5) ➕ `server/pull_manifest_permission_test.go` (+46 -0) 📝 `x/imagegen/mlx/mlx_test.go` (+4 -4) 📝 `x/imagegen/models/flux2/flux2.go` (+9 -9) 📝 `x/imagegen/models/flux2/rope.go` (+18 -18) 📝 `x/imagegen/models/flux2/scheduler.go` (+1 -1) 📝 `x/imagegen/nn/nn.go` (+2 -2) 📝 `x/imagegen/safetensors/safetensors.go` (+0 -1) 📝 `x/imagegen/tokenizer/tokenizer.go` (+4 -4) 📝 `x/imagegen/tokenizer/tokenizer_test.go` (+13 -13) 📝 `x/imagegen/vae/tiling.go` (+6 -6) </details> ### 📄 Description Fixes #14762 If manifest creation fails due to filesystem permission errors, downloaded blobs may remain without a manifest. This leaves the model in a partially installed state where later commands fail with "pull model manifest: file does not exist". This change rolls back partially downloaded blobs when manifest creation fails, ensuring the system remains in a consistent state. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 09:49:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77132