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:
1 parent
5f29328932
commit
a6e7bbb17e
10 files changed
+218
-14
No files matched your search
+8
-2
@@ -137,7 +137,10 @@ the subvolume therefore see at most one migration snapshot at a time.
|
||||
after the job is `ready-for-cutover`. Afterwards the subvolumes hold only the
|
||||
snapshots of the application. Since the final snapshot is the immutable
|
||||
reference of the last round, run `cleanup` only after the cutover has been
|
||||
checked. `cleanup` is idempotent.
|
||||
checked. As its last step, `cleanup` deletes the target claim (see below) and
|
||||
the directories `.cephmig/claims` and `.cephmig` if they are empty. The job
|
||||
is then finished: `cleanup` and `finalize` do nothing more, and `sync` is
|
||||
refused. `cleanup` is idempotent.
|
||||
|
||||
Application snapshots are never deleted. The journal marks a snapshot as
|
||||
`removed` before deleting it, so an interrupted run completes the deletion
|
||||
@@ -370,7 +373,10 @@ space is required for it. Path depths beyond 128 directories are currently
|
||||
rejected. After a hard process abort during an index run, temporary index
|
||||
directories can remain; they are never used as checkpoints.
|
||||
|
||||
Journal and claim must be kept for resumption. An incomplete claim after a
|
||||
Journal and claim must be kept for resumption; `cleanup` deletes the claim
|
||||
only after the job is finished, and only if it holds the job's own ID. The
|
||||
lock is an advisory CephFS `flock`: it excludes other cephmig processes, but
|
||||
does not block any application. An incomplete claim after a
|
||||
crash during its very first creation is deliberately not repaired
|
||||
automatically; that requires checking the original job ID.
|
||||
|
||||
|
||||
Reference in new issue
Block a user