unifi-utilities / unifios-utilities

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

UDM Pro firmware 2.4.x `podman-install` script fails to download zip file #485

Closed CobyPear closed 1 year ago

CobyPear commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Much to my dismay I was not aware of the 2.4 firmware update and lost my all of my utils configs. (I had to do a factory reset then backup to even be able to connect to my UDM pro from the app)

In re-adding these tools, I followed the directions to install the 2.x boot scripts https://github.com/unifi-utilities/unifios-utilities/tree/main/on-boot-script-2.x#install

After that I followed the steps to install podman https://github.com/unifi-utilities/unifios-utilities/tree/main/podman-install

To Reproduce Steps to reproduce the behavior:

  1. Install the boot script
  2. Copy the podman config files to /data/podman/conf
  3. Execute the script at /data/on_boot.d/00-podman.sh
  4. See error

Expected behavior Podman is successfully installed

Actual: zip file fails to download

Screenshots If applicable, add screenshots to help explain your problem.

downloading https://unifi.boostchicken.io/udmpro-podman-install.zip
download failed

UDM Information

I reached out for help on Discord and got some great suggestions. It seems someone else was also suffering from their configs getting wiped, but they managed to get things working when following the same steps as above.

bradharmon commented 1 year ago

I'm having the same issue

CobyPear commented 1 year ago

@bradharmon I was able to workaround this issue with the following steps:

  1. Download the zip file at the bottom of this page: https://github.com/unifi-utilities/unifios-utilities/actions/runs/3556229784
  2. scp the file from your host machine to the UDM pro. Make sure you name it udmpro-podman-install.zip on your UDM. It should to inside /data/podman/cache
  3. Run the 00-podman.sh as usual. It should find the zip file in the cache and proceed as normal.
bradharmon commented 1 year ago

@CobyPear Thanks for the insight. I came to the same conclusion, however, when I did the same, this happened:

(using cache at /data/podman/cache/udmpro-podman-install.zip)
unzip:  cannot find or open /data/podman/cache/podman-install.zip, /data/podman/cache/podman-install.zip.zip or /data/podman/cache/podman-install.zip.ZIP.
ln: failed to create symbolic link '/etc/containers/libpod.conf': No such file or directory
ln: failed to create symbolic link '/etc/containers/policy.json': No such file or directory
ln: failed to create symbolic link '/etc/containers/registries.conf': No such file or directory
ln: failed to create symbolic link '/etc/containers/storage.conf': No such file or directory
Something went wrong

I wonder if I messed something else up?

bradharmon commented 1 year ago

It looks to me like it’s also looking for podman-install.zip as well, but I haven’t looked into the scripts further at this point.

CobyPear commented 1 year ago

@CobyPear Thanks for the insight. I came to the same conclusion, however, when I did the same, this happened:

(using cache at /data/podman/cache/udmpro-podman-install.zip)
unzip:  cannot find or open /data/podman/cache/podman-install.zip, /data/podman/cache/podman-install.zip.zip or /data/podman/cache/podman-install.zip.ZIP.
ln: failed to create symbolic link '/etc/containers/libpod.conf': No such file or directory
ln: failed to create symbolic link '/etc/containers/policy.json': No such file or directory
ln: failed to create symbolic link '/etc/containers/registries.conf': No such file or directory
ln: failed to create symbolic link '/etc/containers/storage.conf': No such file or directory
Something went wrong

I wonder if I messed something else up?

@bradharmon

Ah maybe I misread a bit or edited my script and forgot. try renaming the zip in the /data/podman/cache to podman-install.zip. I was getting a similar error and I think I did not copy the zip over correctly, but eventually I got it going.

1cyber commented 1 year ago

Having same issues, anyone can assist with the proper file location for the podman to be transferred of pdoman-install.zip?

1cyber commented 1 year ago

@CobyPear Did you manage to get this up and running? I can get the tunnel up however i can't seem to get the scripts to run when rebooting. Any chance you can give me a breakdown what you did to get it online after reboot?

1cyber commented 1 year ago

Do you need to create a folder called /data/podman/cache? in my current setup i dont have the cache folder.

CobyPear commented 1 year ago

@1cyber yes, you will need to create any dirs missing with these steps, including copying the config files into /data/podman/conf.

bradharmon commented 1 year ago

The download is succeeding again and install works now

nadroj71 commented 1 year ago

This thread is saving me! I have a question though, are the correct permissions applied to the files unzipped/copied when 00-podman.sh is executed? Also, I get WARN[0000] Failed to read current user namespace mappings

I copied the contents of conf to /data/podman/cache like the instructions said.

KittyKatt commented 1 year ago

I'm also experiencing the above error and not sure how important it is or how to get past it.

Upon further searching: https://github.com/unifi-utilities/unifios-utilities/issues/416#issuecomment-1427117949

Looks harmless.