My team has some tooling to create various hardened Linux images and we’ve been seeing transient errors on AlmaLinux 9.7 instances on Google Cloud Platform (GCP), especially while upgrading all packages (sudo dnf upgrade -y):
stderr
[Errno 2] No such file or directory: ‘/var/cache/dnf/baseos-09b2e93483836b7c/packages/kernel-5.14.0-611.30.1.el9_7.x86_64.rpm’
Usually this works fine but occasionally we’ll get an error like this. It’s quite a baffling situation and we can’t understand how to avoid these errors, even though they are transient. They prevent us from getting successful builds and we have to re-run jobs and cross our fingers, hoping it doesn’t happen again.
I’ve opened a support case with GCP but I’m wondering if the problem is in AlmaLinux.
Does anyone have any advice?