You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(tasks) Provide retry logic for install_package_file
I have seen some failures in kvm_automation_tooling CI where attempting
to install the openvox8-release package with rpm will fail because of
the rpm lock held be some other process during vm initialization:
2025-05-07T00:18:42 [INFO]: Executing: rpm -Uvh /tmp/tmp.jkHsr7JPYU/openvox8-release-el-9.noarch.rpm
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
Package managers like dnf, yum, apt, etc, already handle waiting for the
locks, but direct use of rpm or dpkg can run into these problems.
This patch wraps the use of rpm and dpkg (for manually installing the
downloaded openvox release file) with a little retry logic. It only
fires if the command fails and the error output matches a regex for a lock
file error. This is brittle, but if the match fails, the default behavior
is as if no retries were done. This is safest, since failures outside of
a lock conflict are most likely for a good reason.
0 commit comments