diff --git a/seaweed-block/docs/operations-manual.md b/seaweed-block/docs/operations-manual.md index a13560af1c..2adfed6673 100644 --- a/seaweed-block/docs/operations-manual.md +++ b/seaweed-block/docs/operations-manual.md @@ -615,24 +615,33 @@ writing the v1.0 format until you finalize. Until then you can go back. 5. **Finalize** once every holder runs v1.1. - **Before running `sw-block cluster finalize-format`:** + **Hard rule: from the end of the upgrade until `sw-block cluster finalize-format` completes, no v1.0.x volume process + may run on any host, and none may start.** - 1. **No v1.0.x volume process may be running, or be able to start, on any host until the finalize completes.** - - Upgrade every host's blockvolume binary and units to v1.1.x. - - Check that no running volume process is still the v1.0.x binary. - - Do not roll any host back. - 2. **After the last start or restart of any volume process, wait at least 30 seconds before running the finalize.** - In that time, each running process reports its own read level to blockmaster. The finalize's check then judges - the processes actually running, not the processes they replaced. If the finalize refuses, fix what it names and - wait again after any restart. - 3. **While the finalize runs, do not start a v1.0.x volume process.** Restarting a v1.1.x volume process is safe. + Check it on **every host itself**. blockmaster's view cannot show it, so do not rely on it. - **Why.** In v1.1.2, a volume process's lease renewal does not name the process. - - Until a new process's first heartbeat reaches blockmaster, blockmaster still holds the report of the process it - replaced. - - v1.1.2 volume processes wait for that first heartbeat before renewing. A v1.0.x process may not wait. - - Steps 1 and 2 together close that gap. - - v1.1.3 carries the process identity on every renewal and removes this procedure. + ```sh + # 1. Every RUNNING volume process: /proc//exe runs the image that process is running, + # even if an upgrade has since replaced the file on disk. Every line must show v1.1.x. + for pid in $(pgrep -x blockvolume); do printf '%s ' "$pid"; sudo /proc/"$pid"/exe --version; done + # 2. The binary a restart would start: every unit's ExecStart must point at a v1.1.x blockvolume. + systemctl cat 'sw-blockvolume@*' | grep ExecStart + ``` + + If any line shows v1.0.x, stop that volume and upgrade it before the finalize. Do not roll any host back while the + finalize runs. + + **Also:** wait at least 30 seconds after the last start or restart of any volume process before running the + finalize. In that time, each running process reports its read level, and the finalize refuses while one reports an + older level. This wait catches a process that was missed. It does not replace the hard rule (see "What remains"). + + **What remains (stated, not closed in v1.1.2):** + - The finalize judges each serving volume process by the last heartbeat report blockmaster received for that volume. + - A report delayed in the network or inside blockmaster can arrive after a newer process's report and stand in for + it. No wait bounds that delay. + - The hard rule is what keeps the finalize safe in that case. With no v1.0.x process running, every report, delayed + or not, comes from a process that reads the v1.1 format. + - v1.1.3 carries the process identity on every lease renewal and at the finalize, which removes this rule. Then: diff --git a/seaweed-block/docs/releases/v1.1.2.md b/seaweed-block/docs/releases/v1.1.2.md index cf99e7b9f2..55530d785c 100644 --- a/seaweed-block/docs/releases/v1.1.2.md +++ b/seaweed-block/docs/releases/v1.1.2.md @@ -27,9 +27,11 @@ from disk. ERROR delivery is best effort if logging is blocked; termination rema under a restarting supervisor and inspect `format-level` after recovery. Failures before replacement leave level 0 and may be retried. -- **Format finalize, operator step.** Before `sw-block cluster finalize-format`: - - make sure no v1.0.x volume process is running or can start on any host; - - wait at least 30 seconds after the last volume process start. +- **Format finalize: operator rule.** From the end of the upgrade until `sw-block cluster finalize-format` completes: + - no v1.0.x volume process may run or start on any host. Check it on each host from the running processes + (`/proc//exe --version`), not from blockmaster; + - wait 30 seconds after the last volume process start before finalizing. - A v1.0.x process that renews its lease before its first heartbeat could otherwise be judged on its predecessor's - report. See the operations manual. v1.1.3 removes this step. + The finalize now refuses while a serving volume process reports an older read level. A delayed heartbeat report + can still stand in for a newer process, and the rule covers that case. v1.1.3 removes the rule. See the + operations manual.