-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
Try to restore broken pihole.toml from rotated files #1738
Conversation
…ll existing setupVars.conf, etc. files. However, it arguably makes more sense to instead restore from the last known-to-be-good rotated config file in /etc/pihole/config_backups Signed-off-by: DL6ER <dl6er@dl6er.de>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. |
7eca379
to
f45fe2f
Compare
Signed-off-by: DL6ER <dl6er@dl6er.de>
f45fe2f
to
1a517c7
Compare
Co-authored-by: yubiuser <ckoenig@posteo.de> Signed-off-by: DL6ER <DL6ER@users.noreply.github.com>
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.
Signed-off-by: DL6ER <dl6er@dl6er.de>
72f9a2c
to
98f7ff8
Compare
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Looks fine.
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Conflicts have been resolved. |
Signed-off-by: DL6ER <dl6er@dl6er.de>
What does this implement/fix?
If reading
pihole.toml
fails during startup of FTL, we should restore from the last known-to-be-good rotated config file in/etc/pihole/config_backups
and only if they don't exist (migrating from v5.x -> v6.0), we start importing the legacy files.Note that this problem is actually not an issue when the config file is modified and becomes invalid while FTL is running. In this case, FTL simply discards the file and overwrites it with its current configuration (which is in this case the last-known-to-be-good one).
This fixes an observation by @yubiuser where incorrectly escaped Umlauts triggered a "partial config reset". This was actually not a partial reset but FTL trying to restore from your previous v5.x files. This is fixed in this PR be instead using
/etc/pihole/config_backup/pihole.toml.X
(X = 1,2,3
) to recreate/etc/pihole/pihole.toml
.Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.