Skip to content

Commit b5c4399

Browse files
committed
BUGFIX: Display an error message on the console and the message queue if we are unable to find any disks on the host.
1 parent 5d4d61f commit b5c4399

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

sles/src/stack/images/common/sles-stacki.img-patches/opt/stack/bin/output-partition.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,11 @@ def main():
494494
else:
495495
break
496496

497+
# TODO: right now, this is the only place that exit()'s.
498+
# F08-stacki looks specifically for '1' for the case of 'no disks found'
499+
if not host_disks:
500+
sys.exit(1)
501+
497502
#
498503
# if fstab is corrupted, get_host_fstab() will throw and exception.
499504
# catch it and just report an empty fstab

sles/src/stack/images/common/sles-stacki.img-patches/usr/lib/YaST2/startup/First-Stage/F08-stacki

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,13 @@ then
9999
'{"state": "nukedisk failed - check console or reinstall with halt_install_on_error=False"}'
100100
fi
101101

102-
#
103102
# then configure the partitions
104-
#
105103
/opt/stack/bin/output-partition.py > /tmp/partition.xml
104+
if [ $? -eq 1 ]
105+
then
106+
halt_install "Unable to find disks to create partitioning scheme on." \
107+
'{"state": "partition config failed - no disks found"}'
108+
fi
106109

107110
# Configure the bootloader
108111
/opt/stack/bin/output-bootloader.py > /tmp/bootloader.xml

0 commit comments

Comments
 (0)