Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
MongoDB engine upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
devendra104 committed Oct 22, 2019
1 parent 6ec8ab2 commit cdc5cc6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions upgrade/helpers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,3 +998,20 @@ def upgrade_validation(upgrade_type=False):
if upgrade_type:
run('hammer ping', warn_only=True)
run('katello-service status', warn_only=True)


def mongo_db_engine_upgrade(upgrade_type):
"""
The purpose of this method to perform the upgrade of mongo DB database engine
from MMAPv1 to WiredTiger.
:param str upgrade_type: If user select the upgrade_type 'Satellite' then mongodb
upgrade would be performed on Satellite otherwise it would be happened on Capsule
"""
logger.highlight('\n========== MongoDB DataBase Engine Upgrade =================\n')
logger.info("Upgrading the MongoDb Database on {}".format(upgrade_type))
preup_time = datetime.now().replace(microsecond=0)
run("satellite-installer --upgrade-mongo-storage-engine")
postup_time = datetime.now().replace(microsecond=0)
logger.info("MongoDB DataBase Engine Upgraded Successfully")
logger.highlight('Time taken by MongoDB DataBase Engine Upgrade - {}'.format(
str(postup_time - preup_time)))

0 comments on commit cdc5cc6

Please sign in to comment.