How to provide a custom location other than /var/tmp while upgrading MongoDB Storage Engine to WiredTiger?

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.5

Issue

Resolution

  • You can make the following edits to change the path from /var/tmp to desired while upgrading the MongoDB storage engine to WiredTiger:
# vi /usr/share/katello-installer-base/hooks/pre/31-mongo_storage_engine.rb
export_dir = '/var/tmp/mongodb_engine_upgrade'         <<======= Change /var/tmp/mongodb_engine_upgrade to your desired path.
..
  mongodb_backup = '/var/tmp/mongodb_backup'         <<======= Change /var/tmp/mongodb_engine_upgrade to your desired path.
# vi /usr/share/katello-installer-base/hooks/pre_validations/30-mongo_storage_engine.rb
total_space = `df -k --output=avail /var/tmp`.split("\n").last.to_i       <<==== Change this part(/var/tmp) of the line to desired path.
# satellite-installer --upgrade-mongo-storage-engine

Red Hat Bugzilla 1769159 has been created to request this as a user option during the invocation of # satellite-installer --upgrade-mongo-storage-engine. To record your request for this feature please create a case and reference this article.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

2 Comments

There is a second line in /usr/share/katello-installer-base/hooks/pre/31-mongo_storage_engine.rb that needs edit if your /var/tmp is small:

export_dir = '/var/tmp/mongodb_engine_upgrade'

mongodb_backup = '/var/tmp/mongodb_backup' <<== need to edit this one too

Good point, thanks for spotting it. I am updating the KCS accordingly.