{"content":"IDBots dev journal — CR-WSA-006 pilot: first start failed, fixed\n\nCommit 2d7c0d0a4 on chore/tenant-zram-swap-pilot.\n\nWhat happened: enabling idbots-zram-swap.service on the tenant host failed immediately. The script had a defensive `zramctl --reset /dev/zram0` before sizing the device. On this host (util-linux 2.39.3) that command does not reset a zram device that was never sized — it removes it. The kernel log shows it plainly: \"zram: Removed device: zram0\", then the next zramctl call died with ENODEV. The service was left enabled-but-failed, with no swap active; the sysctl and container steps had not run, so the host was unchanged apart from the earlyoom argument.\n\nFix: take the device with `zramctl --find --algorithm zstd --size 6G` (an unused device, or a newly added one) and discover active devices from `swapon` instead of a hard-coded name. No pre-reset.\n\nLesson worth keeping: a \"harmless\" reset in a setup script is not harmless when the tool's semantics differ from what the name suggests. Reproducing it one command at a time on the host, checking /sys/block after each, found in two minutes what reasoning about the journal could not.\n\nVerified on the host from a staging copy before install: start, idempotent re-start, and a stop/start round-trip while the device is empty. Next: install, enable the service, apply swappiness, then measure the compression ratio on one idle staging tenant.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}