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

git lfs quota hit - unable to download podman update files (ie: seccomp.json) #180

Closed risdenk closed 3 years ago

risdenk commented 3 years ago

Describe the bug The podman update fails due to git lfs quota

fetch: Fetching reference refs/heads/master
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
error: failed to fetch some objects from 'https://github.com/boostchicken/udm-utilities.git/info/lfs'

To Reproduce I was able to hit this error after cloning this repo, installing git lfs, then git lfs fetch. https://github.com/boostchicken/udm-utilities/blob/master/podman-update/bin/seccomp.json?raw=true also isn't returning the content of seccomp.json.

Expected behavior https://github.com/boostchicken/udm-utilities/blob/master/podman-update/bin/seccomp.json?raw=true

risdenk commented 3 years ago

So I found part of the culprit - seccomp.json download isn't cached so its downloaded each time. I put together a small change for this, but looks like I can't push to my fork due to the lfs issue :(

git push -f risdenk seccomp_cache
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
Uploading LFS objects:   0% (0/3), 0 B | 0 B/s, done.
error: failed to push some refs to 'git@github.com:risdenk/udm-utilities.git'

Attaching the patch file here in the meantime. 0001-Cache-download-of-seccomp.txt (note: replace .txt with .patch)

risdenk commented 3 years ago

Since the other pieces were already cached, I was able to work around the lfs stuff to get podman update working by copying the contents of seccomp.json from https://github.com/boostchicken/udm-utilities/commit/cce08e2bc493d48c8ab74f1147c7dbc2783389d8 manually into /mnt/data/.cache/seccomp.json and using the patch above on 01-podman-update.sh.

risdenk commented 3 years ago

My suggestion here would be to create a separate repo for the podman binary files and publish them as a release. That doesn't look like it would cost anything to host as a public repository. Github LFS charges for bandwidth and even github packages charge for bandwidth it looks like. Github releases have the following limitation:

Each file included in a release must be under 2 GB. There is no limit on the total size of a release, nor bandwidth usage.

https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/about-releases

risdenk commented 3 years ago

At least for the podman build, I put together https://github.com/risdenk/udm-podman which uses github actions to build podman based on the README instructions. The github actions artifact has the build files. It should be straightforward to make a release if needed. I'm not 100% sure what was done for runc - looks like just a cross compile?

risdenk commented 3 years ago

Figured out how to build runc as well and added it here: https://github.com/risdenk/udm-podman

risdenk commented 3 years ago

I put up an initial release with podman, runc, and seccomp.json - https://github.com/risdenk/udm-podman/releases/tag/v0.1-alpha

boostchicken commented 3 years ago

Fixed!