Bug 1848927

Summary: ReaR backs up unwanted mount points even when ONLY_INCLUDE_VG is specified
Product: Red Hat Enterprise Linux 7 Reporter: Renaud Métrich <rmetrich>
Component: rearAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: medium    
Version: 7.8CC: fkrska, pcahyna, vdolezal
Target Milestone: rc   
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: 2020-11-11 21:53:19 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:
Embargoed:

Description Renaud Métrich 2020-06-19 09:47:10 UTC
Description of problem:

When using ONLY_INCLUDE_VG, only the mount points hosted on the specified VGs should be backed up.
This doesn't work when a mount point is a LVM snapshot, it always gets included even if the hosting VG is not included.

Also seen Upstream with latest.


Version-Release number of selected component (if applicable):

rear-2.4-11.el7.x86_64


How reproducible:

Always


Steps to Reproduce:
1. Set up a system with 2 VGs "rootvg" and "datavg"

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  rootvg: / and swap
  datavg: lv1 and lv2
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

2. Tell ReaR to only include "rootvg" in /etc/rear/local.conf

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  ONLY_INCLUDE_VG=( "rhel" )
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

3. Create snapshot of datavg/lv1 and mount it

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  # lvcreate -s -n snap1 -L 1G datavg/lv1
  # mkdir /lv1; mount /dev/datavg/snap1 /lv1
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

4. Create the backup

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  # rear -dD mkbackuponly
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

5. Check the log and mountpoint_device

  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
  # grep "^2020-06-19" /var/log/rear/rear-$(uname -n).log
  # cat /var/lib/rear/recovery/mountpoint_device 
  -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Actual results:

Log:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[...]
2020-06-19 11:41:42.719675822 Including backup/NETFS/default/500_make_backup.sh
2020-06-19 11:41:42.720618996 Entering debugscripts mode via 'set -x'.
2020-06-19 11:41:42.725437102 Include list:
2020-06-19 11:41:42.726673210   /lv1
2020-06-19 11:41:42.727925601   /
2020-06-19 11:41:42.729160766   /boot
2020-06-19 11:41:42.730396993 Exclude list:
2020-06-19 11:41:42.731597078  /tmp/*
2020-06-19 11:41:42.732825293  /dev/shm/*
2020-06-19 11:41:42.734014866  /var/lib/rear/output/*
2020-06-19 11:41:42.735212698  /media
2020-06-19 11:41:42.736383235  /var/tmp/*
2020-06-19 11:41:42.737612302  /var/crash
2020-06-19 11:41:42.738842499  /tmp/rear.PSGd8ssvRQH85HF
[...]
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

/var/lib/rear/recovery/mountpoint_device:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
/lv1 /dev/mapper/datavg-snap1
/ /dev/mapper/rhel-root
/boot /dev/sda2
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

Expected results:

/lv1 not included.


Additional info:

This only happens with snapshots, I don't understand the logic of the exclusion for now.
/usr/share/rear/conf/default.conf says that using ONLY_INCLUDE_VG populates EXCLUDE_MOUNTPOINTS as well if needed, but there is no associated code.
Looks like to me that this is done when building mountpoint_device instead.

Comment 4 Chris Williams 2020-11-11 21:53:19 UTC
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7.
From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. 

From the RHEL life cycle page:
https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase
"During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available."

If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes:
https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook  

Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. 

Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns.  

[0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7

Comment 5 Red Hat Bugzilla 2023-09-14 06:02:26 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days