From 424d3532b5ece84f0255418cdd97b2b7207a1dde Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 29 2020 07:06:35 +0000 Subject: import rear-2.4-13.el7 --- diff --git a/SOURCES/rear-bz1726043.patch b/SOURCES/rear-bz1726043.patch new file mode 100644 index 0000000..a220365 --- /dev/null +++ b/SOURCES/rear-bz1726043.patch @@ -0,0 +1,35 @@ +From 26dec8c355b6e4abffe818e8a89616159f8e382e Mon Sep 17 00:00:00 2001 +From: Johannes Meixner +Date: Mon, 23 Mar 2020 11:18:23 +0100 +Subject: [PATCH] Update 820_create_iso_image.sh + +Have a hardcoded '-iso-level 3' option in output/ISO/Linux-ppc64le/820_create_iso_image.sh +because it is also hardcoded in output/ISO/Linux-i386/820_create_iso_image.sh +and it seems to also work in general on POWER architecture +cf. https://github.com/rear/rear/issues/2344#issuecomment-601949828 +--- + .../rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh b/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh +index 28b6464f..44b31b80 100644 +--- a/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh ++++ b/usr/share/rear/output/ISO/Linux-ppc64le/820_create_iso_image.sh +@@ -17,7 +17,13 @@ else + chrp_boot_option="-chrp-boot" + fi + +-$ISO_MKISOFS_BIN $v -o "$ISO_DIR/$ISO_PREFIX.iso" -U $chrp_boot_option -R -J -volid "$ISO_VOLID" -v -graft-points "${ISO_FILES[@]}" >&2 ++# Have a hardcoded '-iso-level 3' option also here because it is ++# also hardcoded in output/ISO/Linux-i386/820_create_iso_image.sh ++# and it seems to also work in general on POWER architecture ++# cf. https://github.com/rear/rear/issues/2344#issuecomment-601949828 ++$ISO_MKISOFS_BIN $v -o "$ISO_DIR/$ISO_PREFIX.iso" \ ++ -U $chrp_boot_option -R -J -volid "$ISO_VOLID" -v -iso-level 3 -graft-points \ ++ "${ISO_FILES[@]}" >&2 + + StopIfError "Could not create ISO image (with $ISO_MKISOFS_BIN)" + popd >&2 +-- +2.25.1 + diff --git a/SOURCES/rear-bz1842984-skip-longhorn.patch b/SOURCES/rear-bz1842984-skip-longhorn.patch new file mode 100644 index 0000000..3ef63fa --- /dev/null +++ b/SOURCES/rear-bz1842984-skip-longhorn.patch @@ -0,0 +1,60 @@ +From 1e414d44389e88c9383f892118505c523f20fbb3 Mon Sep 17 00:00:00 2001 +From: Gratien D'haese +Date: Thu, 16 Apr 2020 16:54:18 +0200 +Subject: [PATCH] skip Longhorn Engine replica devices + +Resolves: https://github.com/rear/rear/issues/2365 + +Signed-off-by: Gratien D'haese +--- + .../save/GNU/Linux/230_filesystem_layout.sh | 31 ++++++++++++++++++- + 1 file changed, 30 insertions(+), 1 deletion(-) + +diff --git a/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh b/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh +index 60306718..afc658a6 100644 +--- a/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh ++++ b/usr/share/rear/layout/save/GNU/Linux/230_filesystem_layout.sh +@@ -111,10 +111,39 @@ fi + # but ensure docker_root_dir is not empty (otherwise any mountpoint string matches "^" which + # would skip all mountpoints), see https://github.com/rear/rear/issues/1989#issuecomment-456054278 + if test "$docker_root_dir" ; then +- if echo "$mountpoint" | grep -q "^$docker_root_dir" ; then ++ if echo "$mountpoint" | grep -q "^${docker_root_dir}/" ; then + Log "Filesystem $fstype on $device mounted at $mountpoint is below Docker Root Dir $docker_root_dir, skipping." + continue + fi ++ # In case Longhorn is rebuilding a replica device it will show up as a pseudo-device and when that is the ++ # case then you would find traces of it in the /var/lib/rear/layout/disklayout.conf file, which would ++ # break the recovery as Longhorn Engine replica's are under control of Rancher Longhorn software and these are ++ # rebuild automatically via kubernetes longhorn-engine pods. ++ # Issue where we discovered this behavior was #2365 ++ # In normal situations you will find traces of longhorn in the log saying skipping non-block devices. ++ # For example an output of the 'df' command: ++ # /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 82045336 4500292 77528660 6% /var/lib/kubelet/pods/7f47aa55-30e2-4e7b-8fec-ec9a1e761352/volumes/kubernetes.io~csi/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792/mount ++ # lsscsi shows it as: ++ # [34:0:0:0] storage IET Controller 0001 - ++ # [34:0:0:1] disk IET VIRTUAL-DISK 0001 /dev/sdf ++ # ls -l /dev/sdf /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 ++ # brw-rw---- 1 root disk 8, 80 Apr 17 12:02 /dev/sdf ++ # brw-rw---- 1 root root 8, 64 Apr 17 10:36 /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 ++ # and parted says: ++ # parted /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 print ++ # Model: IET VIRTUAL-DISK (scsi) ++ # Disk /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792: 85.9GB ++ # Sector size (logical/physical): 512B/512B ++ # Partition Table: loop ++ # Disk Flags: ++ # Number Start End Size File system Flags ++ # 1 0.00B 85.9GB 85.9GB ext4 ++ # => as result (without the next if clausule) we would end up with an entry in the disklayout.conf file: ++ # fs /dev/longhorn/pvc-ed09c0f2-c086-41c8-a38a-76ee8c289792 /var/lib/kubelet/pods/61ed399a-d51b-40b8-8fe8-a78e84a1dd0b/volumes/kubernetes.io~csi/pvc-c65df331-f1c5-466a-9731-b2aa5e6da714/mount ext4 uuid=4fafdd40-a9ae-4b62-8bfb-f29036dbe3b9 label= blocksize=4096 reserved_blocks=0% max_mounts=-1 check_interval=0d bytes_per_inode=16384 default_mount_options=user_xattr,acl options=rw,relatime,data=ordered ++ if echo "$device" | grep -q "^/dev/longhorn/pvc-" ; then ++ Log "Longhorn Engine replica $device, skipping." ++ continue ++ fi + fi + fi + # Replace a symbolic link /dev/disk/by-uuid/a1b2c3 -> ../../sdXn +-- +2.25.4 + diff --git a/SPECS/rear.spec b/SPECS/rear.spec index ba62130..063978a 100644 --- a/SPECS/rear.spec +++ b/SPECS/rear.spec @@ -2,7 +2,7 @@ Summary: Relax-and-Recover is a Linux disaster recovery and system migration tool Name: rear Version: 2.4 -Release: 11%{?dist} +Release: 13%{?dist} License: GPLv3 Group: Applications/File URL: http://relax-and-recover.org/ @@ -26,6 +26,8 @@ Patch20: rear-bz1700807.patch Patch21: rear-bz1711123.patch Patch22: rear-bz1692575.patch Patch23: rear-sfdc02343208.patch +Patch24: rear-bz1726043.patch +Patch25: rear-bz1842984-skip-longhorn.patch ExcludeArch: s390x ExcludeArch: s390 @@ -128,6 +130,8 @@ fi %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 +%patch25 -p1 echo "30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue" >rear.cron @@ -162,6 +166,14 @@ TZ=UTC %{__make} -C doc %{_sbindir}/rear %changelog +* Thu Jun 04 2020 Václav Doležal - 2.4-13 +- Apply upstream PR2373: Skip Longhorn Engine replica devices + Resolves: rhbz1842984 + +* Mon Apr 20 2020 Václav Doležal - 2.4-12 +- Apply upstream PR2346: Have '-iso-level 3' option also for ppc64le + Resolves: rhbz1726043 + * Tue Aug 27 2019 Pavel Cahyna - 2.4-11 - Apply upstream PR2122: add additional NBU library path to fix support for NetBackup 8.