Bug 1888127

Summary: getting online backup related warning while performing offline incremental backup.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: Satellite MaintainAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Gaurav Talreja <gtalreja>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: apatel, aupadhye, gtalreja, kgaikwad, pcreech, zhunting
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_maintain-0.7.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 14:48:22 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 Jameer Pathan 2020-10-14 07:14:40 UTC
Description of problem:
getting online backup related warning while performing offline incremental backup.

Version-Release number of selected component (if applicable):
- Satellite 6.8.0 snap 19
- rubygem-foreman_maintain-0.6.13-1.el7sat.noarch

How reproducible:
- Always

Steps to Reproduce:
1. Perform offline incremental backup.

Actual results:

    # foreman-maintain backup offline -y -f -s -p -i /mnt/satellite-backup-2020-10-14-09-51-45/ --features dns,tfp,dhcp,openscap --include-db-dumps /tmp/backup-CKMJwHBcgt/
    Starting backup: 2020-10-14 10:05:00 +0530
    Running preparation steps required to run the next scenarios
    ================================================================================
    Make sure Foreman DB is up:
    / Checking connection to the Foreman DB                               [OK]      
    --------------------------------------------------------------------------------
    Make sure Candlepin DB is up:
    - Checking connection to the Candlepin DB                             [OK]      
    --------------------------------------------------------------------------------
    Make sure Mongo DB is up:
    \ Checking connection to the Mongo DB                                 [OK]      
    --------------------------------------------------------------------------------
    Checks whether the tools for Mongo DB are installed:                  [OK]
    --------------------------------------------------------------------------------
     
     
    Running Backup
    ================================================================================
    Data consistency warning:
    *** WARNING: The online backup is intended for making a copy of the data
    *** for debugging purposes only. The backup routine can not ensure 100% consistency while the
    *** backup is taking place as there is a chance there may be data mismatch between
    *** Mongo and Postgres databases while the services are live. If you wish to utilize the online backup
    *** for production use you need to ensure that there are no modifications occurring during
    *** your backup run.
     
    Do you want to proceed? (assuming yes)


Expected results:
Following warning is not present during offline incremental backup.

    Data consistency warning:
    *** WARNING: The online backup is intended for making a copy of the data
    *** for debugging purposes only. The backup routine can not ensure 100% consistency while the
    *** backup is taking place as there is a chance there may be data mismatch between
    *** Mongo and Postgres databases while the services are live. If you wish to utilize the online backup
    *** for production use you need to ensure that there are no modifications occurring during
    *** your backup run.

Additional info:

Comment 1 Bryan Kearney 2020-12-04 16:02:49 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31328 has been resolved.

Comment 2 Gaurav Talreja 2021-01-15 14:54:47 UTC
Verified.

Tested on Satellite 6.9.0 Snap 9.
Version: rubygem-foreman_maintain-0.7.4-1.el7sat.noarch

Setup:
1. Prepare directories for backups, and assign user `postgres` write permission on those directories for backup.

Steps:
1. Perform online incremental backup using -

  # foreman-maintain backup online -y -f -s -p -i /tmp/test-backup-online/satellite-backup-2021-01-15-07-45-30/ --features dns,tfp,dhcp,openscap 
   /tmp/test-backup-online-incremental/
  <snip>
    Running Backup
   ================================================================================
   Data consistency warning:
   *** WARNING: The online backup is intended for making a copy of the data
   *** for debugging purposes only. The backup routine can not ensure 100% consistency while the
   *** backup is taking place as there is a chance there may be data mismatch between
   *** Mongo and Postgres databases while the services are live. If you wish to utilize the online backup
   *** for production use you need to ensure that there are no modifications occurring during
   *** your backup run.

   Do you want to proceed? (assuming yes)
                                                                      [OK]
  </snip>


2. Perform offline incremental backup using option --include-db-dumps -

   # foreman-maintain backup offline -y -f -s -p -i /tmp/test-backup-offline/satellite-backup-2021-01-15-07-49-31/ --features dns,tfp,dhcp,openscap -- 
   include-db-dumps /tmp/test-backup-offline-incremental/
  <snip>
    Running Backup
   ================================================================================
   Data consistency warning:
   *** WARNING: The database dump is intended for making a copy of the data
   *** for debugging purposes only. The backup routine can not ensure 100% consistency while the
   *** backup is taking place as there is a chance there may be data mismatch between
   *** Mongo and Postgres databases while the services are live. If you wish to utilize the database dump
   *** for production use you need to ensure that there are no modifications occurring during
   *** your backup run.

   Do you want to proceed? (assuming yes)
                                                                      [OK]
  </snip>


Observation:
No warnings related to online backup are seen in offline backup (with options --include-db-dump) methods.

Comment 5 errata-xmlrpc 2021-04-21 14:48:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.9 Satellite Maintenance Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1312