Repository navigation
fix(update): pull the update helper image first, so the in-app update works behind the socket proxy - #642
Closed
GeiserX wants to merge 3 commits into
Closed
fix(update): pull the update helper image first, so the in-app update works behind the socket proxy#642GeiserX wants to merge 3 commits into
GeiserX wants to merge 3 commits into
Conversation
… works behind the socket proxy
containers.run pulls a missing image only when Docker answers "No such
image". Behind the socket proxy the create is refused first with the
proxy's own 404 ("owner policy could not resolve image"), so on any host
that did not already hold docker:27.5.1-cli the Update button failed with
"Docker refused to start the update helper". The worker now checks for
the image and pulls it before the preflight.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 47 seconds. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #642 +/- ##
==========================================
- Coverage 93.97% 93.96% -0.01%
==========================================
Files 74 74
Lines 15678 15701 +23
==========================================
+ Hits 14733 14754 +21
- Misses 945 947 +2
🚀 New features to boost your workflow:
|
…efused image check as the proxy's reason
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On a worker behind the socket proxy, the first press of Update fails with "Docker refused to start the update helper." Nothing gets updated, and the dashboard gives no hint why.
The worker starts its helpers with
containers.run("docker:27.5.1-cli", ...). docker-py pulls a missing image only when Docker answers 404 "No such image". Behind the proxy, the create never reaches Docker. The ownership check resolves the image first and returns its own 404:docker-py does not treat that message as
ImageNotFound, sorunraises instead of pulling. With the raw socket, the same call pulled the image and went on, which is why this only shows up behind the proxy. It affects every proxied install whose host does not already holddocker:27.5.1-cli.We hit this on a real upgrade to 1.73.1. After a manual
docker pull docker:27.5.1-clion that host, the next Update ran and recreated only the worker, as it should.Fix
Before the preflight, the worker checks for the helper image and pulls it if it is missing (
GET /images/.../json, thenPOST /images/create; the policy allows both). A pull that fails becomes the proxy's refusal, or an outage message naming the image, and no helper is started.Tests
TestUpdaterImageintests/test_update_feature.py:containers.run;All three fail on
mainand pass with this change.tests/test_update_feature.py: 55 passed. ruff check and format are clean.Desktop needs nothing: it runs no socket proxy and has no in-app compose update.