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

Mongo DB Engine upgrade. #380

Merged
merged 1 commit into from
Oct 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions upgrade/helpers/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,3 +1054,20 @@ def scap(content_type, content_name):
run('foreman-rake foreman_openscap:bulk_upload:default')
updated_scap_content = entities.ScapContents().search()
scap(updated_scap_content, "updated_scap_content")


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")
jyejare marked this conversation as resolved.
Show resolved Hide resolved
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)))