fix(relocate): guard against from/to resolving to the same machine #53
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "gremlin/relocate-safety-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found via live testing 2026-07-27, immediately after merging #51:
pocketandgrimoirecurrently resolve back to znas itself (CaddyDNS, documented gotcha in reference_znas_ssh memory) since the real
multi-host road topology isn't up yet. Without a same-machine guard,
a relocate targeting "pocket" today would silently deploy the "target"
on the SAME docker engine as the source, then tear the source down
once "target" reports healthy -- net result: the service ends up torn
down entirely, not relocated, while every log entry says "ok".
Added a machine-id comparison (harder guarantee than hostname, which
could theoretically collide) as the second precheck step, right after
basic reachability. Confirmed live: a same-host test now fails cleanly
at this new check instead of proceeding.
Also fixes a second bug from the same test run: the DockerVol
parity check treated every stack as if it must have a DockerVol/
directory. 5 of 14 (stash, it-tools, nettools, kiwix, devdocs) are
either stateless or use
greeninstead, so that directory legitimatelynever exists for them -- the check now only runs for stacks whose
compose file actually references DockerVol/.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01QZCa7HKzyLGzs8qsD3Y5i1