Uh oh!
There was an error while loading. Please reload this page.
Preserve LMDB databases across an on-disk format change - #2405
Open
nickanderson wants to merge 2 commits into
Open
Preserve LMDB databases across an on-disk format change#2405nickanderson wants to merge 2 commits into
nickanderson wants to merge 2 commits into
Conversation
nickandersonforce-pushed
the
CFE-4701/master
branch
from
August 6, 2026 16:50
49ebec9 to
a6d30c9CompareLMDB 1.0 cannot read databases written by 0.9, and reports them as MDB_INVALID, which CFEngine treats as corruption and deletes. Export the databases in the preinstall script while the old mdb_dump is still installed, and import them again in the postinstall script. Ticket: CFE-4701 Changelog: LMDB databases in the state directory are now preserved when upgrading across an LMDB on-disk format change, instead of being discarded as corrupt
nickandersonforce-pushed
the
CFE-4701/master
branch
from
August 6, 2026 19:42
a6d30c9 to
dc40264CompareThe MSI runs none of the shell install scripts, so it needs its own migration. InstallFiles overwrites mdb_dump.exe in place, so a custom action copies the old one aside after StopServices and a second one migrates after InstallFiles. Ticket: CFE-4701 Changelog: LMDB databases are now preserved when upgrading the Windows agent across an LMDB on-disk format change
nickanderson
commented
Aug 7, 2026
MemberAuthor
Deployment tests pass: pr-pipeline #14421 -> sequential-tests #703 green (150 min), including 13-upgrade-minor (3.27.1 -> 3.29.0a) and 15-upgrade-triple (3.24.4 -> 3.27.1 -> 3.29.0a), both of which cross the LMDB 0.9 -> 1.0 format change. The job does not archive the install logs, so this shows the upgrades succeed, not the dump/reload output itself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dumps the LMDB databases in the preinstall script using the old
mdb_dumpand reloads them in the postinstall script using the newmdb_load, so upgrading across an LMDB on-disk format change no longer leaves them looking corrupt and gets them deleted. Gated on anLMDB_VERSIONcomparison, so it is a no-op unless the major.minor series actually changes.Windows needs its own path, since the MSI runs none of those scripts:
packaging/cfengine-nova/lmdb-migrate.cmd, driven by custom actions incfengine-nova.wxs.Worth knowing for review: the deployment-test host lists and the
mass.pyplatform matrix contain no Windows entries, so the Windows half is not exercised by CI. It was validated manually with a realmsiexecmajor upgrade on Windows Server 2019.Ticket: CFE-4701
🤖 Generated with Claude Code