What happened

A plain apt upgrade -y that pulled in a new krill server version silently overwrote /etc/krill/config.json, discarding any values the user had customized (e.g. a non-default port). New keys the packaging wanted to introduce in later versions had no way to land alongside a user’s existing settings either — there was only “keep everything” or “lose everything.”

Root cause

server/package/etc/krill/config.json is shipped as a plain packaged file. Debian’s dpkg only treats a file specially across upgrades (prompt / keep user changes) when it’s declared in DEBIAN/conffiles — this package never had one, and postinst had no config-migration logic of its own. So on every upgrade, dpkg’s normal unpack behavior applied: the new package’s default config.json unconditionally replaced whatever was on disk. This has been true since the packaging was first added (ed2ea1913) — genuinely greenfield, not a regression from a specific later commit.

Fix

Prevention