feat: release the target claim in cleanup

cleanup now deletes the claim file under .cephmig/claims as its last
step, if it holds the job's own ID, and removes the claim directories
when they are empty. A cleaned-up job is finished: cleanup and finalize
do nothing and do not claim the target again, and sync is refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-12-03 20:37:20 +01:00
1 parent 5f29328932
commit a6e7bbb17e
10 files changed
+218 -14

No files matched your search

+1
View File
@@ -215,6 +215,7 @@ for side in source_ceph target_ceph; do
python3 -c 'import json,sys; print(" ".join(sorted(x["name"] for x in json.load(sys.stdin))))')
test "$names" = "history-1 history-2"
done
test ! -e "/mnt/target-fs/.cephmig/claims/$(python3 -c 'import hashlib,sys; print(hashlib.sha256("\0".join(sys.argv[1:]).encode()).hexdigest())' "$(target_ceph fsid)" cephfs migration "$name")"
completed=true
echo 'PASS: Go migration, historical snapshots, live catch-up, quotas, ACLs, xattrs, sparse-file contents, crash/error resume, exclusive target, finalization, snapshot cleanup'