2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-20 17:32:15 +00:00
Files
xcat-core/build-utils/lib
Daniel Hilst 4acaa5b3d8 fix(xcat-core): every build lock failure is reported as a concurrent build
acquire_lock_dir dies with "another build of <what> already holds
<lockdir>" whenever XCAT::NFSLock->acquire fails, whatever the failure was.
A lockdir under a directory that does not exist, or one the build cannot
write, both tell the operator to look for a build that is not running, and
both print the advice about --mock-uniqueext. The nested text said "Trying
to unlock", which is the reverse of what acquire was doing.

acquire_lock_dir now reports contention only when the retry budget ran out,
and prints the error that happened otherwise. The vendored
XCAT::NFSLock is resynced with xcat-dep: its refusal names which failure it
was, and it reclaims a lock.borrow that has no metadata and that two
attempts find unchanged, which was a permanent strand. A lock.d with no
metadata stays refused, so a directory left by a build from before this
change is not recovered by acquire; sweep_stranded removes that one, and
only under an exclusive claim on the root.

buildrpms.pl kept "use POSIX (); # EEXIST, for the directory build lock",
and the lock has not used EEXIST since it became an XCAT::NFSLock. The
import is still needed for WNOHANG in abort_builds.

Depends on xcat-dep/#93, which carries the same change to the original
copy of XCAT/NFSLock.pm.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 10:20:01 -03:00
..