Project

General

Profile

Actions

Bug #25939

closed

cannot restore backup what was created before upgrade-mongo-storage-engine

Added by Martin Bacovsky over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1664641

Description of problem:

it fails to restore backup what had been created before mongo storage engine was upgraded to wiredtiger

  1. foreman-maintain restore /tmp/backup-6.5/satellite-backup-2019-01-08-15-19-56/
    Running Restore backup
    ...
    --------------------------------------------------------------------------------
    Restore configs from backup:
    \ Restoring configs [OK]
    ...
    Run installer reset:
    \ Installer reset [FAIL]
    Failed executing yes | satellite-installer v --reset --disable-system-checks , exit status 6:
    [ INFO 2019-01-08T16:42:08 verbose] Dropping Pulp database!
    rm -f /var/lib/pulp/init.flag finished successfully!
    systemctl stop httpd pulp_workers finished successfully!
    Job for rh-mongodb34-mongod.service failed because the control process exited with error code. See "systemctl status rh-mongodb34-mongod.service" and "journalctl -xe" for details.
    systemctl start rh-mongodb34-mongod failed! Check the output for error!
    [ERROR 2019-01-08T16:42:08 verbose] systemctl start rh-mongodb34-mongod failed! Check the output for error!
    MongoDB shell version v3.4.9
    connecting to: mongodb://127.0.0.1:27017/pulp_database
    2019-01-08T16:42:08.847+0100 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
    2019-01-08T16:42:08.939+0100 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
    connect@src/mongo/shell/mongo.js:237:13
    @(connect):1:6
    exception: connect failed
    mongo pulp_database --eval 'db.dropDatabase();' failed! Check the output for error!
    [ERROR 2019-01-08T16:42:08 verbose] mongo pulp_database --eval 'db.dropDatabase();' failed! Check the output for error!
    ...
    [ERROR 2019-01-08T16:42:33 verbose] Jan 08 16:42:08 vm-198-147.lab.eng.pek2.redhat.com mongod.2701711541: [initandlisten] exception in initAndListen: 28662 Cannot start server. Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, but the specified storage engine was 'mmapv1'., terminating
    ...
    Something went wrong! Check the log for ERROR-level output
    The full log is at /var/log/foreman-installer/satellite.log
    [ INFO 2019-01-08T16:54:31 verbose] All hooks in group post finished
    [ INFO 2019-01-08T16:54:31 verbose] Installer finished in 804.191110789 seconds
    -------------------------------------------------------------------------------

    Scenario [Restore backup] failed.
    ...

problem is that /etc/* files are restored first (Restore configs from backup) where /etc/opt/rh/rh-mongodb34/mongod.conf contains
storage.engine: mmapv1
so later when it does sth. with mongo, it fails to start because it detects wiredtiger files in /var/lib/mongodb

Version-Release number of selected component (if applicable):
sat 6.5 snap 10
rubygem-foreman_maintain-0.3.0-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. install satellite 6.3 (last version with old mongo)
2. upgrade to 6.4
3. upgrade to 6.5
4. foreman-maintain backup ...
5. satellite-installer --upgrade-mongo-storage-engine
6. foreman-maintain restore ...

Actions #1

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_maintain/pull/242 added
Actions #2

Updated by Martin Bacovsky over 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #3

Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/foreman_maintain/pull/244 added
Actions #4

Updated by Amit Upadhye over 6 years ago

  • Pull request deleted (https://github.com/theforeman/foreman_maintain/pull/244)
Actions

Also available in: Atom PDF