2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-24 19:32:17 +00:00
Files
xcat-core/build-utils
Daniel Hilst db8f387fb5 fix(xcat-core): the vendored lock can put two builds in one build lock
Resyncs build-utils/lib/XCAT/NFSLock.pm with xcat-dep, where the defect was
found and fixed. The module reclaimed a stranded lock.borrow by path after
validating its metadata, and rmdir names a path and not the inode that was
validated, so a contender stopped between the two steps removed whatever
was at the path when it resumed. Two builds of one target could then both
hold the build lock, which is the collision the lock exists to prevent.

The borrow is numbered now, and a transition whose taker is provably dead
is ended by creating the next generation rather than by removing the one
that was validated. A process removes only a generation it created and
still holds.

acquire_lock_dir's comment said the retry budget covers reclaiming a borrow
with no metadata over two attempts. That rule is withdrawn, because a live
taker can pause for any length of time before its first write. A take-over
needs one attempt; the budget leaves two for a contended lock.

Depends on xcat-dep/#93, which carries the same change to the original.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-22 13:35:49 -03:00
..
2024-05-07 16:31:30 +02:00

Shared FIPS shell policy

Edit fips-policy.sh, then run:

perl build-utils/sync-fips-policy --write
perl build-utils/sync-fips-policy --check

Commit the source and both updated runtime libraries together. The generated blocks in Genesis usr/lib/xcat/fips.sh and postscripts xcatlib.sh stay tracked so source-checkout callers and standalone packages need no generation step. The RPM and Debian builders reject stale blocks before building either package.

Keep caller-specific helpers outside the generated block. The policy source must remain POSIX shell. It must not depend on the other package at runtime.