Skip to content

Commit

Permalink
products discovery: don't propose to restore a backup to a disk not f…
Browse files Browse the repository at this point in the history
…ound

This will avoid issues where users attempt to upgrade from a very old
version, and a dom0 kernel driver evolution changed the
/dev/disk/by-id/ identifier for the disk, and when the backup became
invalid after a hardware change.

Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson committed Jan 26, 2023
1 parent 140fec5 commit cab52a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tui/installer/screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ def get_installation_type(answers):
upgradeable_products.append(x)
backups = []
for b in answers['backups']:
if not os.path.exists(b.root_disk):
logger.log("%s: disk %s not found, skipping" % (b, b.root_disk))
continue
if b.root_disk in raid_members:
logger.log("%s: disk %s in %s, skipping" % (b, b.root_disk, raid_members))
continue
Expand Down

0 comments on commit cab52a9

Please sign in to comment.