unifi-utilities / unifios-utilities

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

Upgrade of UDM-Pro OS from 3.1.16 to 3.2.6 (and/or Network 7.5.187 to 8.0.7) broke my working nspawn-container Pi-Hole install #581

Closed waffles0042 closed 7 months ago

waffles0042 commented 7 months ago

As the title says: my upgrade of UDM-Pro OS from 3.1.16 to 3.2.6 (and/or Network 7.5.187 to 8.0.7) broke the working nspawn-container Pi-Hole install.

I went through the installation steps here to see if anything got wiped out during the install but could not find anything wrong. Eventually I did a factory reset/restore of the UDM-Pro to start fresh, again following the installation steps:

All seems to be well for big Step1 and big Step2A section 3. However, things then fall apart on section 4. => the debian-custom image (machine) is not being recognized. (Note: I have kept versions of the various configuration files that are usually being created/customized during the install. Rather than completely recreating them, I am copying them via WinSCP from my laptop to the respective locations in the UDM-Pro)

image

Any thoughts on why I am getting stuck?

StevenGFX commented 7 months ago

I ran into this with my two containers (one for pihole and one for a Cloudflare tunnel). However, I didn't go as far as factory resetting my UDM pro since my machines and .spawn config files still existed. I haven't investigated yet and just wanted to see if I could quickly bring them back up. I ran these commands and got them running again, but I'm not sure what exactly I really needed to do.

systemd-nspawn -M debian-custom -D /data/custom/machines/debian-custom
systemctl enable systemd-networkd
ln -s /data/custom/machines/debian-custom /var/lib/machines/
machinectl start debian-custom
machinectl enable debian-custom
waffles0042 commented 7 months ago

Thanks @StevenGFX for your reply. With your commands I was able to continue the fresh PiHole install and got it even working. However, it did not survive a UDM-Pro reboot. => Does yours?

I tried your commands again, but this time to no avail. I tried several things, including making a PiHole repair attempt.

So I believe something is still broken and the process as laid out in the instructions does not seem to be working for my setup anymore. (Still I am not yet ruling out myself as the root cause here :-)). However, I need to find a more time to sort my thoughts and findings to ask more intelligently for help here.

Still in the meantime any pointers and suggestions would greatly appreciated by a newbie like me.

waffles0042 commented 7 months ago

quick update: I have PiHole working again. Not sure though how I exactly managed that. It seems that somewhere during the install and later on after a UDM reboot the container looses 'internet' access again, e.g. a simple ping to the web no longer works. (sorry for my newbie way of describing the situation.)

waffles0042 commented 7 months ago

another update on my progress: to get my Container and PiHole install properly running again I need to execute /data/on_boot.d/10-setup-network.sh .

This points me to this part in the How-to: image

I don't think I ever did anything in any of my previous installs, so the udm-boot service (RED) seemed to be preinstalled already and maybe now is not any more.

So I started looking into the BLUE option... and ran into this message when I tried to enable it: "Failed to look up unit file state: Is a directory"

Any thoughts?

waffles0042 commented 7 months ago

Final update: I got it working again.

I installed this aprt: https://github.com/unifi-utilities/unifios-utilities/blob/main/on-boot-script-2.x/README.md

PiHole now auto-starts again after a UDM-Pro reboot.

Hope someone in a similar situation will find my notes helpful.

waffles0042 commented 7 months ago

closed - all is well again.