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
With #184, enroot gained a work-around for Ubuntu-images doing post-install shenanigans for timezone files.
We (@j-hellenberg, me) found that some other ubuntu images seem to exhibit a race condition in the new code, resulting enroot/pyxis container startup to fail in the hook:
I managed to force the race with the "flocker.sh" below, but ONLY after I introduced the sleep 0.05 AND the 10x cp
Other uses of cp do NOT complain, even if the destination exists.
maybe noteworthy, lslocks does show the lock as UNIX lock, as opposed to other locks that show up as POSIX or FLOCK.
I am at loss what "cannot create symbolic link '...': File exists" should actually mean since other times, cp happily overwrites the destination, even without --force
`flocker.sh`
#!/bin/bashset -ex
set -o pipefail
PARENT=${1-$PWD}echo$PARENT
FLOCKER="${PARENT}/flock"
LOCK="${FLOCKER}/LOCK"err() {
echo"$1"exit 1
}
leflock() {
(
flock -w 30 "${_lock}"|| err "no lock can do"#sleep 1
sleep 0.05
stat "${PARENT}/SRC"| grep -v id || err "no SRC yet?"
stat "${FLOCKER}/DST"| grep -v id ||echo"no DST yet,OK"
Z=10
while(( Z--));do
cp --no-dereference --preserve=links "${PARENT}/SRC""${FLOCKER}/DST"done#sleep 1
) {_lock}>"${LOCK}"
}
echo == prepare ==
mkdir -p ${FLOCKER}
ln -sf /tmp/definitiely/no/extisting/file/or/directory/cannot/make/that/up "$PARENT/SRC"echo == go ==
X=120
while(( X--));do
leflock
doneecho == done ==
The text was updated successfully, but these errors were encountered:
With #184, enroot gained a work-around for Ubuntu-images doing post-install shenanigans for timezone files.
We (@j-hellenberg, me) found that some other ubuntu images seem to exhibit a race condition in the new code, resulting enroot/pyxis container startup to fail in the hook:
A workaround seems to add
--force
to thecp
's inenroot/conf/hooks/10-localtime.sh
Line 25 in 2bd5143
enroot/conf/hooks/10-localtime.sh
Line 29 in 2bd5143
@3XX0 suggested investigating the shared/network filesystem, because the hooks are actually running in a
flock
ed scope:enroot/src/runtime.sh
Line 243 in 2bd5143
I investigated the flocking behaviour and found:
sleep 0.05
AND the 10xcp
cp
do NOT complain, even if the destination exists.maybe noteworthy,
lslocks
does show the lock asUNIX
lock, as opposed to other locks that show up asPOSIX
orFLOCK
.I am at loss what "cannot create symbolic link '...': File exists" should actually mean since other times,
cp
happily overwrites the destination, even without--force
`flocker.sh`
The text was updated successfully, but these errors were encountered: