unifi-utilities / unifios-utilities

A collection of enhancements for UnifiOS based devices
GNU General Public License v3.0
3.86k stars 415 forks source link

Issue with reinstalling PiHole after upgrade of UDMP from 2.427 to 2.5.16 (Stuck at Step #5.0) #488

Closed waffles0042 closed 1 year ago

waffles0042 commented 1 year ago

The f/w upgrade on my UDMP from 2.427 to 2.5.16 broke the PiHole installation. (Just a few days ago I had upgraded from 1.x to 2.427, which had also wiped out the PiHole install, but following the guides here I was able to get PiHole up and running again.)

Now PiHole broken again after the upgrade to 2.427, I followed the instructions for 1) the on-boot script and 2) podman

...but got stuck at the last step of the PiHole install: (https://github.com/unifi-utilities/unifios-utilities/tree/main/run-pihole)

when I run the block listed under Step 5.0 to pull the latest PiHole image and to define the configuration I keep getting a 'writing blob" error:

root@UDM-Pro:~# podman run -d \ --network dns \ --restart always \ --name pihole\ -e TZ="America/Detroit" \ -v "/mnt/data/etc-pihole/:/etc/pihole/" \ -v "/mnt/data/pihole/etc-dnsmasq.d/:/etc/dnsmasq.d/" \ --dns=127.0.0.1 \ --dns=1.1.1.1 \ --hostname pi.hole \ -e VIRTUAL_HOST="pi.hole" \ -e PROXY_LOCATION="pi.hole" \ -e FTLCONF_REPLY_ADDR4="192.168.5.5" \ -e IPv6="False" \ pihole/pihole:latest Resolving "pihole/pihole" using unqualified-search registries (/etc/containers/registries.conf) Trying to pull docker.io/pihole/pihole:latest... Getting image source signatures Copying blob 34575e9e3344 skipped: already exists Copying blob df40c53e6b66 skipped: already exists Copying blob 2dff53955dde skipped: already exists Copying blob 5731adb3a4ab skipped: already exists Copying blob 4f4fb700ef54 skipped: already exists Copying blob 79368a84c86e done Copying blob 44048c8f578a done Copying blob 5112faa29188 done Copying blob a73f1490e597 done Error: writing blob: adding layer with blob "sha256:5112faa29188ea93d5550c836f489e54e003854b53d937d438bdcd06deefd642": error creating layer with ID "3225a77464ab369ff84b6967f60ae1118eb56d7e0e9fb06dd6e6a4940e14431a": open /var/lib/containers/storage/vfs/dir/3225a77464ab369ff84b6967f60ae1118eb56d7e0e9fb06dd6e6a4940e14431a/var/log/alternatives.log: file exists How do I fix this? Thanks!

pedropombeiro commented 1 year ago

Can you try removing all images and containers using podman system prune -a?

waffles0042 commented 1 year ago

@pedropombeiro ; that was it! I am up and running again. Thank you very much!!

Interestingly, the prune command seemingly had not resulted in any 'tangible' change: image

waffles0042 commented 1 year ago

I updated my UDMP to 2.5.17 and it broke my PiHole install again. So I started over with setting up on-boot, podman and lastly run-pihole......and got stuck at the same step again. I tried @pedropombeiro prune command but no luck this time.

What puzzles me a bit is that even though I get the message that prune was seemingly successful, the next pull shows several blobs as already existing. Could it be that the prune command did not clean out as needed here? image

pedropombeiro commented 1 year ago

@waffles0042 I think there have been changes to the prune command lately. Not sure if passing the --volumes argument to the command would help.

waffles0042 commented 1 year ago

@pedropombeiro ; thank you so much for your quick reply... and YES, you were spot on once again.

podman system prune --volumes

..did the trick. PiHole is up and running again!