mirror of
https://github.com/xcat2/confluent.git
synced 2026-11-19 17:02:22 +00:00
Merge pull request #345 from Obihoernchen/fix/diskless-stop-on-extract-failure
Stop a diskless boot when the root filesystem cannot be extracted
This commit is contained in:
@@ -66,7 +66,11 @@ if [ "untethered" = "$imagemethod" -o "uncompressed" = "$imagemethod" ]; then
|
||||
else
|
||||
mount -t tmpfs disklessroot /sysroot
|
||||
fi
|
||||
extract_untethered_rootimg
|
||||
if ! extract_untethered_rootimg; then
|
||||
# a partly extracted root would boot into a broken system
|
||||
echo "Unable to boot: the root filesystem could not be extracted into memory, the image may be too large for an untethered boot on this node"
|
||||
while :; do sleep 86400; done
|
||||
fi
|
||||
else
|
||||
TETHERED=1
|
||||
mount -o discard /dev/zram0 /mnt/overlay
|
||||
|
||||
@@ -65,7 +65,11 @@ if [ "untethered" = "$imagemethod" -o "uncompressed" = "$imagemethod" ]; then
|
||||
else
|
||||
mount -t tmpfs disklessroot /sysroot
|
||||
fi
|
||||
extract_untethered_rootimg
|
||||
if ! extract_untethered_rootimg; then
|
||||
# a partly extracted root would boot into a broken system
|
||||
echo "Unable to boot: the root filesystem could not be extracted into memory, the image may be too large for an untethered boot on this node"
|
||||
while :; do sleep 86400; done
|
||||
fi
|
||||
else
|
||||
TETHERED=1
|
||||
mount -o discard /dev/zram0 /mnt/overlay
|
||||
|
||||
@@ -99,7 +99,11 @@ elif [ "$imagemethod" = uncompressed ]; then
|
||||
mount -t tmpfs disklessroot /sysroot
|
||||
fi
|
||||
if [ "$TETHERED" = 0 ]; then
|
||||
extract_untethered_rootimg
|
||||
if ! extract_untethered_rootimg; then
|
||||
# a partly extracted root would boot into a broken system
|
||||
echo "Unable to boot: the root filesystem could not be extracted into memory, the image may be too large for an untethered boot on this node"
|
||||
while :; do sleep 86400; done
|
||||
fi
|
||||
elif [ ! -f /tmp/mountparts.sh ]; then
|
||||
mkdir -p /mnt/overlay/upper /mnt/overlay/work
|
||||
mount -t overlay -o upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work,lowerdir=/mnt/remote disklessroot /sysroot
|
||||
|
||||
Reference in New Issue
Block a user