chore(buglog): log bug-1872, bug-1874..1877 fixed (44173f74)

bug-1873 (systemd pid race) is held back until pc13v's environment is recorded.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-09-28 04:37:51 +00:00
parent 44173f74ae
commit 244148acef
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
6 changed files with 407 additions and 0 deletions

54
.wolf/bugs/bug-1877.md Normal file
View file

@ -0,0 +1,54 @@
---
id: "bug-1877"
status: "fixed"
status_updated: "2026-09-28"
status_note: ""
component: "controller"
severity: "noise"
timestamp: "2026-09-28T03:52:37Z"
last_seen: "2026-09-28T03:58:49Z"
occurrences: 1
files: ["src/controller/persist.c"]
tags: ["controller", "persistence", "encryption", "logging"]
related: []
fix_commits: ["44173f74"]
---
# bug-1877: controller warns 'WAL/snapshot stored unencrypted' without checking the storage
## Description
**Observed:**
```
[2026-09-28 11:52:37,938] [51034] [ WARN] [ persist_init] WAL/snapshot stored unencrypted in /tmp/xce-ha-deploy/controller/ctrl-3/data/wal — ensure filesystem is encrypted if job payloads contain sensitive data
```
**Expected:** the warning only when the WAL's storage is not encrypted.
**Impact:** the advisory fired on encrypted storage too, so it carried no information. On pc13v (/tmp, not shown to be encrypted) it still correctly appears after the fix.
**Found by:** user report from a pc13v HA deploy, 2026-09-28
## Environment
- OS: no /etc/os-release; Docker container; NixOS kernel; kernel Linux 6.18.33 x86_64
- libc: glibc 2.42-47 (interpreter /nix/store/wb6rhpznjfczwlwx23zmdrrw74bayxw4-glibc-2.42-47/lib/ld-linux-x86-64.so.2)
- Toolchain: gcc (GCC) 15.2.0, meson 1.9.1
- Build: asan (xce.build)
- Code: scheduler-framework @ 8cadeeb2 (last commit without the fix)
- Deployment: first seen on pc13v: 3-node HA (ctrl-1..3) + scheduler + apiserver + real root xcecd under systemd, deploy dir /tmp/xce-ha-deploy, 2026-09-28 11:52 +0800 (pc13v's OS, libc and exact commit were not recorded; the values above are from the reproduction on this dev host, same nix toolchain)
## Reproduction
1. Put a controller's workdir on a LUKS/dm-crypt or fscrypt filesystem at 8cadeeb2
2. Start it: the warning is logged anyway (persist_init never checked)
- Frequency: deterministic (every controller start)
- Evidence: the xcecd/scheduler/controller/apiserver logs pasted in the user's report, 2026-09-28 (quoted above)
## Root cause
persist_init() (controller/persist.c) logged the warning unconditionally.
## Fix
persist_path_encrypted() checks the WAL directory for fscrypt (statx STATX_ATTR_ENCRYPTED) and its block device for a dm-crypt layer via sysfs (dm/uuid starting CRYPT-), following `slaves` so LVM on LUKS counts (persist_dev_is_dmcrypt()). Encrypted storage is logged at INFO; anything not shown to be encrypted keeps the WARN.
## Verification
- Test: test_luks_device_is_encrypted, test_lvm_on_luks_is_encrypted, test_plain_partition_and_plain_lvm_are_not and test_unknown_device_is_not_claimed_encrypted in src/controller/testsuite/test_persist_encryption.c, against a fake sysfs tree (new functions; there was no check before)
- Suites: full ASAN build (xce-build all): 113/113 suites after the updated scheduler picker-registration test; controller 1250/0, harness 141/0, worker diskstats 4/0, scheduler picker wiring 11/0 + picker registration 4/0, apiserver TestRootWarning PASS
- Live: n/a here (no encrypted volume on this host); on pc13v the warning is expected to remain for /tmp
## References
- Related: none