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
Syncthing should guard against running old versions with new config #4921
Comments
I don't see an actual problem though. If something was incompatible, I guess I would expect it to fail. If it didn't, it's probably ok. The new/old config stuff would get cleaned up on first config save. |
It can be a problem as it’ll (re)write attributes in an old format that is no longer understood by newer Syncthings and won’t be converted again. I think it would be sane to refuse to load a config from the future by default.
|
@calmh, @AudriusButkevicius, @ssergiienko Hi there, |
Mmm, yes. There's a current config version, defined somewhere in config.go I think. If the config on disk has a higher number than that, it has a newer schema that we by definition don't understand. There's a place in main.go where we check if the config was upgraded, which might be a good place to also check if the config version is too high and abort. Alternatively the check could happen already in the config loader, but it would be nice to be able to force a start with |
@calmh Thanx, I will work on it and implement ASAP |
Problem:
I have latest release of Syncthing (v0.14.47) and during development & debugging I accidentally run older version of Syncthing v0.14.(4 or 17) and it was successfully started in background because config paths are the same (defaults).
Now, my config.xml becomes a mix of old-style and new-style options but still has version=28 and who knows what can happen to other files if version will be even older(e.g. db format incompatibility).
For example:
What's expected? One of this:
--allow-downgrade
(or whatever)Version Information
Syncthing Version: Any
OS Version: Any
The text was updated successfully, but these errors were encountered: