ben-grande / qusal

Salt Formulas for Qubes OS.
14 stars 6 forks source link

apt cacher fedora updates fail with zchunk errors on fresh install #54

Closed c0mmando closed 1 month ago

c0mmando commented 1 month ago

Commitment

I confirm that I have read the following resources:

Software version

Tested up to commit b2c9479

Brief summary

Two separate attempts at a fresh install using qusal failed when running sudo qubesctl --targets=tpl-mgmt state.apply when iterating through the mgmt installation steps. The script fails at the install-salt-deps stage due to sys-cacher zchunk errors.

Steps to reproduce

Perform a fresh install using qusal and proceed through the bootstrap guide up to mgmt install.

Expected behavior

Installation should proceed as expected with sys-cacher handling fedora updates. Alternatively all fedora templates should not be using apt cacher

Actual behavior

After installing sys-cacher all attempts to update fedora vms fail with zchunk errors

ben-grande commented 1 month ago

Fedora with apt-cacher-ng is not a perfect match unfortunately and everything that does not matches perfectly can cause disruptions in the workflow, I understand. I did a successful formula installation on Fedora yesterday and all went fine the first run, the following runs also failed with zchunk.

https://github.com/ben-grande/qusal/issues/47#issuecomment-2085162500

Fix the problem by uninstaller cacher from the Fedora templates (the following examples uses fedora-39-minimal and tpl-mgmt, if you have other Fedora templates, also include those):

sudo qubesctl --skip-dom0 --targets fedora-39-minimal,tpl-mgmt state.apply sys-cacher.uninstall-client
qvm-tags del fedora-39-minimal updatevm-sys-cacher
qvm-tags del tpl-mgmt updatevm-sys-cacher

Then just run the state again. Maybe you need to run before on the templates sudo dnf clean all, but not sure.

The "real" fix is that I am not gonna support caching Fedora anymore with apt-cacher-ng, too much trouble. If a better cacher for Fedora exists and is secure, I will consider.

ben-grande commented 1 month ago

After you update, read the sys-cacher/README.md to get a list of unsupported qubes as the cacher client. Note that it may contain false positives in case the qube was never updated successfully before.