Documentation
¶
Overview ¶
Package corromigrate handles the one-time migration of the on-disk Corrosion store from systemd-managed v0.x to v1.0.0 running in a uncloudd-managed container. TODO: remove in 0.22 assuming all pre 0.20 clusters upgraded their pre-v1 Corrosion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySeedIfPresent ¶
ApplySeedIfPresent re-applies the durable rows from the seed file into the running Corrosion store, then deletes the seed file as the final completion marker. Idempotent: re-running on the same seed is a no-op for cluster rows (INSERT OR REPLACE) and machines rows (skipped via GetMachine).
func MigrateIfNeeded ¶
MigrateIfNeeded stops the legacy systemd Corrosion unit and, when a v0.x store.db is detected, dumps its durable rows to a seed file next to the data dir, then backs up the dir so the new version can start fresh. Idempotent: if the seed file already exists, the dump step is skipped (a prior run already produced it).
Types ¶
type ClusterEntry ¶
type MachineEntry ¶
type Seed ¶
type Seed struct {
Cluster []ClusterEntry `json:"cluster"`
Machines []MachineEntry `json:"machines"`
}
Seed is the on-disk representation of the durable rows dumped from a v0.x Corrosion store, to be re-applied to the fresh v1.0.0 store. Existence of the seed file is the signal that migration has not yet fully completed.