I am using the provided docker images. I deploy them using Terraform and have /etc mapped to a docker volume.
I recently upgraded to v6 which initially seemed to be ok until I realized none of the adds were being blocked because the Gravity database seems corrupt.
I have tried deleting the gravity.db file and restarting the container but that doesn't see to work
I tried to force the pihole -up or pihole -r but it always tells me it doesn't work in a container.
Expected Behaviour:
Upon upgrading to v6 the system should be properly blocking adds.
Actual Behaviour:
The system is unable to update the gravity logs.
I see these errors in the log.
2025-03-10 03:39:33.051 UTC [49M] ERROR: SQLite3: no such column: adlist_id in "SELECT adlist_id from vw_gravity WHERE domain = ? AND group_id IN (0);" (1)
2025-03-10 03:39:33.051 UTC [49M] ERROR: gravityDB_open("SELECT(... vw_gravity ...)") - SQL error prepare: SQL logic error
And I get these errors when running Gravity.
[✓] DNS resolution is available
[i] Neutrino emissions detected...
[✓] Preparing new gravity database
[✓] Creating new gravity databases
[✓] Pulling blocklist source list into range
[i] Using libz compression
[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[✓] Status: No changes detected
[✗] Unable to prepare SQL statement to update adlist properties in database file /etc/pihole/gravity.db_temp
[✓] Building tree
[i] Number of gravity domains: 0 (0 unique domains)
[i] Number of exact denied domains: 0
[i] Number of regex denied filters: 0
[i] Number of exact allowed domains: 0
[i] Number of regex allowed filters: 0
[✓] Optimizing database
[✓] Swapping databases
[✓] The old database remains available
[✓] Cleaning up stray matter
[✓] Done.
Please generate a new debug log (the previous one expired a few days ago).
If you are really running our docker image, it is already using the correct versions, but maybe the versions file is corrupted or it was changed when you mounted the whole /etc directory (why would you do this???).
Try to run (inside the container) this command: pihole updatechecker and then run pihole -v again.
I didn't mount /etc I created a volume that was /etc inside the container so that everything persists between containers. I think that was based on some past example I had followed. I think it's the .pihole directory that was causing problems before.
Core version is v5.18.3 (Latest: v6.0.5)
Web version is v6.0.2 (Latest: v6.0.2)
FTL version is v6.0.4 (Latest: v6.0.4)
If creating a volume for /etc isn't the right way I can switch it to just the /etc/pihole directory. At this point I am considering just starting fresh and I can set it up that way, but I am curious how I got it into this state where it seems to know about v6 core ( it says it in the version file) but it's happily running v5.18.3.