Be more graceful when detecting a v5->v6 migration #1629
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR aim to accomplish?:
So far in development of the v6 container, I've not actually tested any v5->v6 migrations, and rather naively assumed that FTL handled everything we needed to worry about.
In pi-hole/pi-hole#5635, we see that this can cause some issues with
setupVars
not being correctly migrated by pihole-FTL due to the way we have effectively been bulldozering over that process.This PR adds a check right at the beginning of the startup to determine if we are v5 (Simple check,
if setupVars exists and pihole.toml does not
), if we are, then we defer some of the functionality that would write topihole.toml
until after FTL has first started... giving it a chance to complete it's migrationsOutput after first start when upgrading from v5
Subsequent container starts
Startup on fresh V6 container (no volumes/empty volumes)
By submitting this pull request, I confirm the following:
git rebase
)