Skip to content

Fix contradictory runtime-enable status messaging - #19

Merged
modem7 merged 1 commit into
masterfrom
fix-runtime-enable-status-messaging
Jul 31, 2026
Merged

Fix contradictory runtime-enable status messaging#19
modem7 merged 1 commit into
masterfrom
fix-runtime-enable-status-messaging

Conversation

@modem7

@modem7 modem7 commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

Found on samwise's actual --apply run: the zpool sysfs write was denied (lockdown), which set RUNTIME_OK=false and printed "zswap ... isn't live yet" — but the enabled=1 write succeeded independently of zpool, so zswap actually was live, just potentially not on the zsmalloc backend. The final summary then unconditionally said "reboot isn't required (zswap is already live)" regardless of what Step 3 actually managed.

  • Result section now also prints zswap zpool (previously missing — there was no way to see that specific write had failed from the output).
  • The final "Done" message is now derived from comparing the four read-back sysfs values against what was requested, not from whether every individual write in Step 3 succeeded. Three cases: fully live as configured, live but partially configured (with a pointer to the mismatch and the WARNING above), or not enabled at all.
  • Step 3's warning text no longer asserts "it isn't live yet" — that's not knowable until enabled is actually checked, which now happens in Step 5.

Test plan

  • bash -n syntax check passes
  • Reasoned through against samwise's actual pasted output — new logic correctly lands in the "live but not fully configured" branch for that exact case
  • Not re-run live (test VM unreachable, real hosts already migrated) — this only changes read/display logic, no new mutating commands

samwise's run showed the exact gap: the zpool write was denied
(lockdown), which set RUNTIME_OK=false and printed "it isn't live
yet" — but the enabled=1 write succeeded independently, so zswap
actually was live, just not necessarily on the zsmalloc backend.
The final summary then unconditionally claimed "reboot isn't
required (zswap is already live)" regardless of what actually
happened in Step 3.

Now the Result section reads back and prints zpool (previously
missing entirely, so there was no way to see the write had failed),
and the final message is derived from the four read-back values
compared against what was requested, not from whether every
individual sysfs write in Step 3 succeeded.
@modem7
modem7 merged commit 7b5744b into master Jul 31, 2026
3 checks passed
@modem7
modem7 deleted the fix-runtime-enable-status-messaging branch July 31, 2026 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant