Problem
Config reload failed while generation 1 was live because metadata preload could not connect to /run/remotepfs/nbd.sock: nbd_connect_uri: connect: No such file or directory. Full service restart restored operation, but restart is not a fix.
Expected behavior
POST /api/config/reload and compile/activate keep service lifecycle safe and either wait for the new NBD socket or fail without tearing down the active gadget generation.
Evidence
- API service runs as root.
- nbdkit runs as
remotepfs-nbd.
- Socket directory is
0700, socket is 0600, owned by remotepfs-nbd:remotepfs.
- Current SBC state recovered after full service restart: NBD connected and UDC bound.
Plan
- Trace compile/activate ordering around nbdkit stop/start and metadata preload.
- Add socket readiness and ownership checks before invoking nbdsh.
- Preserve active generation when activation or preload fails.
- Add API regression coverage for reload while generation 1 is live.
- Verify reload, NBD connection, UDC binding, and read-only behavior on SBC.
Problem
Config reload failed while generation 1 was live because metadata preload could not connect to
/run/remotepfs/nbd.sock:nbd_connect_uri: connect: No such file or directory. Full service restart restored operation, but restart is not a fix.Expected behavior
POST /api/config/reloadand compile/activate keep service lifecycle safe and either wait for the new NBD socket or fail without tearing down the active gadget generation.Evidence
remotepfs-nbd.0700, socket is0600, owned byremotepfs-nbd:remotepfs.Plan