Bug 1473640

Summary: Restore with multiple ISOs does not detect additional ISOs due to blkid output parsing mismatch
Product: Red Hat Enterprise Linux 7 Reporter: Julio Entrena Perez <jentrena>
Component: rearAssignee: Jakub Mazanek <jmazanek>
Status: CLOSED CURRENTRELEASE QA Contact: qe-baseos-daemons
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.3CC: fkrska, jentrena, kcleveng, ovasik, pcahyna, pdwyer, rmetrich
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-04 08:53:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1420851    

Description Julio Entrena Perez 2017-07-21 11:15:23 UTC
Description of problem:
A backup that results in multiple ISO images due to ISO_MAX_SIZE= can not be restored.
After processing the first ISO, ReaR keeps prompting for the 2nd ISO image and is unable to recognise it.
Due to issue in bug 1462189 this means that there is no possible way of using the built-in backup method.

Version-Release number of selected component (if applicable):
rear-1.17.2-9.el7_3

How reproducible:
Always

Steps to Reproduce:
1. Configure the built-in backup method to limit the size of the output ISO images:

# cat /etc/rear/local.conf  | grep -v ^#
OUTPUT=ISO
OUTPUT_URL=file:///srv/backup
BACKUP=NETFS
BACKUP_URL=iso:///backup
ISO_MAX_SIZE=2048

2. Create rescue media with built-in backup ("rear mkbackup")

3. Boot with the first ISO image and wait for the prompt for the second ISO image.

4. Insert second ISO image.

Actual results:
ReaR keeps fails to detect and keeps prompting for additional ISO images.

Expected results:
ReaR detects additional ISO images and completes restore.

Additional info:
This is a known issue already fixed upstream: https://github.com/rear/rear/issues/1081

File /usr/share/rear/restore/NETFS/default/40_restore_backup.sh contains:

label=$(blkid /dev/${dev} | awk 'BEGIN{FS="[=\"]"} {print $3}')

But output of 'blkid' in the restore environment (once booted with the first ISO) is:

# blkid /dev/cdrom
/dev/cdrom: UUID="2017-07-19-11-10-00-00" LABEL="RELAXRECOVER_01" TYPE="iso9660"

So it's matching 2017-07-19-11-10-00-00 rather than RELAXRECOVER_01.

Full patch (combined with fix for issue https://github.com/rear/rear/pull/1082) is:

https://github.com/rear/rear/commit/938a2cf4302fca2b6fdff437669dd5c9fe36df53

The combination of this issue with genisoimage inability to create ISO images containing files larger than 4GB (see bug 1462189 ) results in the built-in backup method being completely broken, hence the severity.