Comment 6 for bug 1945874

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Actually, I got caught by "imported_pools_ vs "all_pools". So yeah, this is expected (this list is to cleanup, removing any temporary imported pool by the script to list all systems available on grub).

The issues is below, (I don’t have time to debug it fully right now), but in this part of set -x I believe:
+ zfs list -H -o name,canmount,mountpoint -t filesystem
+ awk {print $1}
+ grep -E ^tank(\s|/[[:print:]]*\s)(on|noauto)\s/$
+ echo
+ boot_list=
+ generate_grub_menu_metadata
+ local bootlist=
+ get_machines_sorted
+ local bootlist=
+ echo
+ + awk {print $3}
sort -u

which is triggered by that:
    for dataset in $(get_root_datasets); do
        # get information from current root dataset
        boot_list="${boot_list}$(get_dataset_info "${dataset}" ${mntdir})\n"

        # get information from snapshots of this root dataset
        snapshots="$(zfs list -H -o name -t snapshot "${dataset}"|while read snapshot_dataset; do
            get_dataset_info "${snapshot_dataset}" ${mntdir}
        done)"
        [ -n "${snapshots}" ] && boot_list="${boot_list}${snapshots}\n"
    done