Bug 1704803

Summary: /var/tmp/mongodb_engine_upgrade is not removed after successful MongoDB storage engine upgrade
Product: Red Hat Satellite Reporter: Evgeni Golov <egolov>
Component: InstallationAssignee: Chris Roberts <chrobert>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: chrobert, desingh, inecas, mbacovsk, mmccune, pcreech, pgagne
Target Milestone: 6.6.0Keywords: Triaged, Upgrades
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: https://projects.theforeman.org/issues/26737
Whiteboard:
Fixed In Version: foreman-installer-1.22.0.8-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:48:32 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:
Bug Depends On: 1731794    
Bug Blocks:    

Description Evgeni Golov 2019-04-30 14:32:55 UTC
Description of problem:
Satellite 6.5 allows to move existing MongoDB installs from MMAPv1 to wiredTiger. To do so, the installer has a --upgrade-mongo-storage-engine flag, which will dump the existing MMAPv1 DB, re-configure MongoDB to use wireTiger and re-import the dump.

To do so, it will create a dump at /var/tmp/mongodb_engine_upgrade, but it does not remove the dump after the installer completed.

It *also* creates a backup (like the on-disk data), and that IS removed on success.

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

How reproducible:
100%

Steps to Reproduce:
1. Install Satellite 6.3 (the last that defaulted to MMAPv1)
2. Upgrade to 6.4, 6.5
3. Upgrade storage engine with --upgrade-mongo-storage-engine

Actual results:
/var/tmp/mongodb_engine_upgrade is present after successful upgrade

Expected results:
/var/tmp/mongodb_engine_upgrade absent

Additional info:

Comment 5 Devendra Singh 2019-07-18 14:30:29 UTC
Hi Evgeni,

To Verify this bug I have performed below steps.
1- Installed  Satellite 6.3 machine
2- Upgrade Step 1 machine to 6.4 and then 6.5.
3- After upgrade, I performed MongoDB upgrade by using below command
  # satellite-installer --upgrade-mongo-storage-engine
4- MongoDB upgrade completed successfully but "mongodb_engine_upgrade" directory was not removed from "/var/tmp/" so here Bugzilla: 1704803 get hit.

  # ls -l /var/tmp/mongodb_engine_upgrade
  total 8
  drwxr-xr-x. 2 root root 4096 Jul 18 08:53 pulp_database

Need to clarify the below steps :
5- After step 4 perform the upgrade from 6.5 to 6.6
6- After step 5 trigger Step 3 to verify Bugzilla: 1704803 

Kindly confirm.

Comment 6 Evgeni Golov 2019-07-18 17:12:59 UTC
Devendra, you can only migrate the MongoDB storage engine once. So you'd have to:

1- Installed  Satellite 6.3 machine
2- Upgrade Step 1 machine to 6.4, 6.5 and finally 6.6
3- After the 6.6 upgrade, I performed MongoDB upgrade by using below command
  # satellite-installer --upgrade-mongo-storage-engine
4- After step 5 trigger Step 3 to verify Bugzilla: 1704803 

(copy&pasting your steps, as I'm lazy)

Comment 10 Devendra Singh 2019-08-29 09:54:07 UTC
Verified this issue on 6.6 with the latest snap.
Verified point: 
* satellite version: satellite-6.6.0-6.el7sat.noarch
* foreman-installer version: foreman-installer-1.22.0.10-1.el7sat.noarch
* Mongodb upgrade completed successfully on 6.6 upgraded setup(6.3-->6.4-->6.5-->6.6)

#satellite-installer --upgrade-mongo-storage-engine
Starting disk space check for upgrade
Package versions are locked. Continuing with unlock.
....
.....
Installing             Done                                               [100%] [................................................................................................................................]

* File /var/tmp/mongodb_engine_upgrade did not exist after mongodb upgrade.
# ls /var/tmp/mongodb_engine_upgrade
ls: cannot access /var/tmp/mongodb_engine_upgrade: No such file or directory

Comment 12 Bryan Kearney 2019-10-22 19:48:32 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, 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/RHSA-2019:3172