Release Engineering

Tasklist

FS#24353 - aif shell quit right after HD partition

Attached to Project: Release Engineering
Opened by taylorchu (taylorchu) - Thursday, 19 May 2011, 19:34 GMT
Last edited by Dieter Plaetinck (Dieter_be) - Sunday, 14 August 2011, 08:59 GMT
Task Type Bug Report
Category AIF
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version testbuild (specify!)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

# process all entries in $TMP_BLOCKDEVICES, create all blockdevices and filesystems and mount them correctly
process_filesystems ()
{
debug 'FS' "process_filesystems Called. checking all entries in $TMP_BLOCKDEVICES"
rm -f $TMP_FSTAB
generate_filesystem_list
returncode=0

# phase 1: create all blockdevices and filesystems in the correct order (for each fs, the underlying block/lvm/devicemapper device must be available so dependencies must be resolved. for lvm:first pv's, then vg's, then lv's etc)
# don't let them mount yet. we take care of all that ourselves in the next phase

inform "Phase 1: Creating filesystems & blockdevices" disks
done_filesystems=
for i in `seq 1 10`
do
open_items=0
while read part part_type part_label fs_type fs_create fs_mountpoint fs_mount fs_opts fs_label fs_params
do
fs_id="$part $fs_type $fs_mountpoint $fs_opts $fs_label $fs_params"
if [ "$fs_create" = yes ]
then
if check_is_in "$fs_id" "${done_filesystems[@]}"
then
debug 'FS' "$fs_id ->Already done"
else
needs_pkg=${filesystem_pkg[$fs_type]}
[ -n "$needs_pkg" ] && check_is_in $needs_pkg "${needed_pkgs_fs[@]}" || needed_pkgs_fs+=($needs_pkg)

# We can't always do -b on the lvm VG. because the devicefile sometimes doesn't exist for a VG. vgdisplay to the rescue!
if [ "$part_type" = lvm-vg ] && vgdisplay $part | grep -q 'VG Name' # $part is a lvm VG and it exists. note that vgdisplay exists 0 when the requested vg doesn't exist.
then
debug 'FS' "$fs_id ->Still need to do it: Making the filesystem on a vg volume"
inform "Making $fs_type filesystem on $part" disks
process_filesystem $part $fs_type $fs_create $fs_mountpoint no_mount $fs_opts $fs_label $fs_params && done_filesystems+=("$fs_id") || returncode=1
elif [ "$part_type" != lvm-pv -a -b "$part" ] # $part is not a lvm PV and it exists
then
debug 'FS' "$fs_id ->Still need to do it: Making the filesystem on a non-pv volume"
inform "Making $fs_type filesystem on $part" disks
process_filesystem $part $fs_type $fs_create $fs_mountpoint no_mount $fs_opts $fs_label $fs_params && done_filesystems+=("$fs_id") || returncode=1
elif [ "$part_type" = lvm-pv ] && pvdisplay ${fs_params//__/ } >/dev/null # $part is a lvm PV. all needed lvm pv's exist. note that pvdisplay exits 5 as long as one of the args doesn't exist
then
debug 'FS' "$fs_id ->Still need to do it: Making the filesystem on a pv volume"
inform "Making $fs_type filesystem on $part" disks
process_filesystem ${part/+/} $fs_type $fs_create $fs_mountpoint no_mount $fs_opts $fs_label $fs_params && done_filesystems+=("$fs_id") || returncode=1
else
debug 'FS' "$fs_id ->Cannot do right now..."
open_items=1
fi
fi
fi
done < $TMP_FILESYSTEMS
[ $open_items -eq 0 ] && break
done
[ $open_items -eq 1 ] && show_warning "Filesystem/blockdevice processor problem" "Warning: Could not create all needed filesystems. Either the underlying blockdevices didn't appear in 10 iterations, or process_filesystem failed" && returncode=1



# phase 2: mount all filesystems in the vfs in the correct order. (also swapon where appropriate)

inform "Phase 2: Mounting filesystems" disks
while read part part_type part_label fs_type fs_create fs_mountpoint fs_mount fs_opts fs_label fs_params
do
if [ "$fs_mountpoint" != no_mountpoint ]
then
inform "Mounting $part ($fs_type) on $fs_mountpoint" disks
process_filesystem $part $fs_type no $fs_mountpoint $fs_mount $fs_opts $fs_label $fs_params || returncode=1
elif [ "$fs_type" = swap ]
then
inform "Swaponning $part" disks
process_filesystem $part $fs_type no $fs_mountpoint $fs_mount $fs_opts $fs_label $fs_params || returncode=1
fi
done < <(sort -t \ -k 6 $TMP_FILESYSTEMS)

BLOCK_ROLLBACK_USELESS=0
[ $returncode -eq 0 ] && inform "Done processing filesystems/blockdevices" disks 1 && return 0
return $returncode
}

this is the function where the bug might be in.

2010.05.16 x86_64 netinstall
HD partition fail.
it really looks like a syntactic error to me because aif shell quits right after the bug.
This task depends upon

Closed by  Dieter Plaetinck (Dieter_be)
Sunday, 14 August 2011, 08:59 GMT
Reason for closing:  Works for me
Additional comments about closing:  this report is useless. no mention of any error, output or logfile.
user has no time to reproduce. closing.
Works for me, but if anyone sees the issue again, reopen and attach the output of aif-report-issues
Comment by Mitchell Richters (mjr4077au) - Saturday, 28 May 2011, 04:53 GMT
Whether my issue is related or not, I also got a message "Warning: Could not create all needed filesystems. Either the underlying blockdevices didn't appear in 10 iterations, or process_filesystem failed" when using 2011-05-27.

See here: http://sprunge.us/jNKA
Comment by taylorchu (taylorchu) - Saturday, 28 May 2011, 07:42 GMT
yes. It will quit right away after partitioning. I did not record everything on that day, and I did not have time to reproduce this bug again. but since aif does not change in 05.16 and 05.27, I am sure that we have the same problem. Thanks.
Comment by Mitchell Richters (mjr4077au) - Saturday, 28 May 2011, 10:01 GMT
Worth a mention, shortly after the above kerfuffle, the HDD in my laptop (machine using test image on) suffered a head crash and shit itself (will not initialise). Whether it's a coincidence or not is unknown to me. I might dust off an old machine tomorrow and test.

Loading...