-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add filesystem migration syscall #15
Conversation
5f96a2f
to
93801d3
Compare
93801d3
to
97e5557
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t fully understand this PR currently. Do you have a branch that shows who this would look like in the runner?
My understanding is:
- Applications and backends can define migration functions with the signature
fn(&dyn DynFilesystem, &dyn DynFilesystem)
. - The runner registers these migration functions when setting up the trussed-staging backend and assigns a versioning scheme.
- The migrations are then triggered by the runner using a syscall that provides the versions.
My open questions:
- Why are the migrations implemented as a syscall if they are only triggered by the runner? Couldn’t the runner just call some function of the backend?
- This provides applications with much more privileges than they actually need. Can’t we use a
DynClientFilestore
for application migrations and something like aBackendFilestore
for backend migrations? - How is the current FS version stored? Shouldn’t it be managed by the backend?
Migrations are triggered by the admin app.
That's true, but the reason for that is to be able to perform migrations much more efficiently. Iterating over directories with the
This could be managed by the backend, but that makes 1 more file to store somewhere on the IFS. |
But still during the boot/setup process and not triggered by a command? |
Initially yes, but it was made lazy before the dispatches because until then the trussed service is actually not yet running. Maybe running it manually would be better, but the trussed service owns the filesystem when the admin app is loaded. |
Maybe this has its place in the actual configuration loading of the admin app actually. It has access to a clientfilestore and it could get access to the raw filestore that way. |
I think we can always directly access the filesystems in the runner because |
Right. I'll migrate to that then. We can merge the split and merge migrations later. |
Motivated by Nitrokey/fido-authenticator#55 and trussed-dev/trussed-auth#39