Repository navigation
Conversation
…lling it The worker force-removed any container named cashpilot-fence that carried the fence label before starting its own. On a host that also runs the Desktop app, that is the other side's helper while it is still running, so the other side recorded a failed fence and refused its deploy. The worker now waits for a helper that is running, or was created or exited in the last 10 seconds, and removes only a leftover. A create that loses the race on the name is tried once more. Its own helper is created and started apart and removed by its own object, never by name.
|
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 19 minutes. 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 #636 +/- ##
==========================================
- Coverage 93.97% 93.93% -0.05%
==========================================
Files 74 74
Lines 15678 15736 +58
==========================================
+ Hits 14733 14781 +48
- Misses 945 955 +10
🚀 New features to boost your workflow:
|
|
Live check against a real Docker engine (Linux Docker in a VM), worker image 1.72.1, with this branch's and main's
|
Problem
Before it starts its own fence helper, the worker force-removed any container named
cashpilot-fencethat carried the fence label. The Desktop app runs the same helper under the same name and label. On a host that runs both, that container can be the other side's helper, still running, while the other side waits for its result. Killing it makes the other side record a failed fence and refuse its deploy.Fix
This is the same behaviour the Desktop app has in
clearHelper:containers.runused to do implicitly.cashpilot-fencewithout our label is still left alone.Tests
TestAnotherProcesssHelperintests/test_lan_fence.py:Expected 'remove' to not have been called. Called 2 times.The whole file passes: 154 tests.
Desktop needs nothing: it already waits for the other side's helper (
helperBusy/clearHelperininternal/runtime/lanfence.go).