-
Notifications
You must be signed in to change notification settings - Fork 213
Description
Datastore migrations trigger an auto-snapshot, but sometimes unnecessarily, such as when the datastore version is too high because an older Ziti was run with a newer datastore. Controllers in operational scenarios typically restart automatically, so continually creating snapshots and exiting with an error results in a large number of useless snapshots. Can we avoid snapshotting when the datastore version is too high?
In scenarios where the older, rolled-back Ziti requires an older datastore version, we need two pieces of information:
- The datastore version contained in each auto-snapshot file,
- the max datastore version allowed by each Ziti version, e.g., https://github.com/openziti/ziti/blob/v1.6.9/controller/db/migrations.go#L28
It's probably sufficient to name the auto-snapshot with a convention that includes its datastore version, since the required datastore version for some version of Ziti is relatively easy to find once you know where to look, but replacing:
panic: Unsupported edge datastore version: 40
...with a message that points out the max version would avoid looking it up because the admin can directly reference the required datastore version in the snapshot file to restore.