Skip to content

Commit

Permalink
cmdlib.sh: keep trying to remount after killall hack
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jlebon committed Aug 21, 2024
1 parent 242d152 commit 5e7638f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,10 @@ if [ -n "\${cachedev}" ]; then
# XXX: brutal workaround for https://github.com/coreos/coreos-assembler/issues/3848
killall rofiles-fuse || :
/sbin/fstrim -v ${workdir}/cache
mount -o remount,ro ${workdir}/cache
while ! mount -o remount,ro ${workdir}/cache; do
echo "failed to remount cache ro; retrying..." |& tee /dev/virtio-ports/cosa-cmdout
sleep 1
done
fsfreeze -f ${workdir}/cache
fsfreeze -u ${workdir}/cache
umount ${workdir}/cache
Expand Down

0 comments on commit 5e7638f

Please sign in to comment.