Comment 2 for bug 1932976

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Right, but the problem is in disk_handler. Consider this code:

    if config.value_as_boolean(info.get('preserve')):
        # Handle preserve flag, verifying if ptable specified in config
        if ptable and ptable != PTABLE_UNSUPPORTED:
            current_ptable = block.get_part_table_type(disk)
            LOG.debug('disk: current ptable type: %s', current_ptable)
            if current_ptable not in PTABLES_SUPPORTED:
                raise ValueError(
                    "disk '%s' does not have correct partition table or "
                    "cannot be read, but preserve is set to true. "
                    "cannot continue installation." % info.get('id'))

After the wipe in raid_handler, block.get_part_table_type(disk) will return None so the error gets raised. Perhaps the conditional here should check wipe as well? (And maybe not check preserve, come to think of it...)