-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement versioning for migrations #673
Comments
The extraction of the updater from the workstation repository turns out to require a couple of small migrations to ensure we don't leave old files laying around. We used this as an opportunity to start thinking about how the goals described above can be implemented in sensible way. The approach we've settled on so far is described as follows:
This will be implemented as a kind of test-balloon for |
This is still an open issue - for now the updater has been merged back to securedrop-workstation without the initial versioned migration code, but we can pull it back in if necessary. |
At this year's Qubes OS Summit, @marmarek suggested this as a specific application of #1178/#1053. With a The philosophical question still worth considering is how much we gain by mixing imperative and declarative approaches like this, especially as we get more interested in enforcing and verifying system state, e.g. in #951. |
The preflight updater currently has a very limited mechanism for triggering a full
sdw-admin --apply
run (i.e. enforcing all Salt states and not just the ones specified fordom0
via https://github.com/freedomofpress/securedrop-workstation/blob/main/dom0/sd-workstation.top#L5-L21).That mechanism works as follows:
check-migration
script performs feature tests to drop migration flag in/tmp/sdw-migrations
In the case of #661, the drawbacks of that approach became apparent:
/tmp
) if the user reboots after a failed update that successfully upgraded the RPM and the state of the system is not necessarily assured;In short, feature detection alone is insufficient to handle all migration types, and postinst-type hacks are hackish.
As we do with Alembic-managed database migrations, we need a way to version migrations and the state of the system, so we can apply the migrations that are required. The scope of this issue is:
sdw-admin --apply
run);The text was updated successfully, but these errors were encountered: