refactor: convert filesystem migration markers to plugin properties
The docker-options DOCKER_OPTIONS_<PHASE>.migrated sentinels and the storage data/storage-registry/migrations/<app> flag files are now stored as per-app properties (`migrated-<phase>` and `legacy-mounts-migrated` respectively), so they survive a property-store backup/restore and align with the existing `migrated-from-files`, `env-migrated`, and `nginx-conf-sigil-migrated` patterns. The new markers are written only when a non-empty legacy source was actually migrated, distinguishing apps that never had legacy state from apps that did and were drained. A one-cycle upgrade-cycle conversion drains any leftover filesystem sentinels into the new properties and removes the files; for docker-options the conversion deliberately runs before the global `migrated-from-files` short-circuit so installs upgrading from the previous release still get their `.migrated` files converted.
This commit is contained in:
@@ -37,7 +37,10 @@ func TriggerInstall() error {
|
||||
|
||||
// The install trigger runs as root; the directories it just made are
|
||||
// root-owned, but the dokku user is the one that runs storage:create
|
||||
// and writes entry / migration-flag files into them.
|
||||
// and writes entry files into them. migrationFlagDir() stays in the
|
||||
// list for one release cycle so the upgrade-cycle conversion in
|
||||
// MigrateLegacyMounts can read pre-existing flag files.
|
||||
// TODO(post-deprecation): drop migrationFlagDir() from this list.
|
||||
for _, dir := range []string{RegistryDirectory(), EntriesDirectory(), migrationFlagDir()} {
|
||||
if err := os.MkdirAll(dir, 0755); err != nil {
|
||||
return fmt.Errorf("Unable to create %s: %s", dir, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user