Skip to content

Commit 5e7638f

Browse files
committed
cmdlib.sh: keep trying to remount after killall hack
Michael and I were debugging an issue where `cosa build` would still break on: ``` + killall rofiles-fuse + /sbin/fstrim -v /home/jenkins/agent/workspace/bootupd_PR-706/cache /home/jenkins/agent/workspace/bootupd_PR-706/cache: 17.8 GiB (19084976128 bytes) trimmed + mount -o remount,ro /home/jenkins/agent/workspace/bootupd_PR-706/cache mount: /home/jenkins/agent/workspace/bootupd_PR-706/cache: mount point is busy. ``` which I think is because the rofiles-fuse processes haven't fully been cleaned up yet. Let's just spam retry to remount the cache, but notify the user when this is happening for more visibility. We should be able to revert this once we fix #3848
1 parent 242d152 commit 5e7638f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cmdlib.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,10 @@ if [ -n "\${cachedev}" ]; then
762762
# XXX: brutal workaround for https://github.com/coreos/coreos-assembler/issues/3848
763763
killall rofiles-fuse || :
764764
/sbin/fstrim -v ${workdir}/cache
765-
mount -o remount,ro ${workdir}/cache
765+
while ! mount -o remount,ro ${workdir}/cache; do
766+
echo "failed to remount cache ro; retrying..." |& tee /dev/virtio-ports/cosa-cmdout
767+
sleep 1
768+
done
766769
fsfreeze -f ${workdir}/cache
767770
fsfreeze -u ${workdir}/cache
768771
umount ${workdir}/cache

0 commit comments

Comments
 (0)