{"action":"created","comment":{"url":"https://api.github.com/repos/Katello/katello-installer/pulls/comments/197901754","pull_request_review_id":131736033,"id":197901754,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzkwMTc1NA==","diff_hunk":"@@ -0,0 +1,53 @@\n+pulp_db_param = param('katello', 'pulp_db_name') || param('foreman_proxy_content', 'pulp_db_name')\n+fail_and_exit('Unknown pulp database name') unless pulp_db_param\n+MONGO_DB_NAME = pulp_db_param.value\n+\n+def fail_and_exit(message)\n+  Kafo::Helpers.log_and_say :error, message\n+  kafo.class.exit 1\n+end\n+\n+def migration\n+  export_dir = '/var/tmp/engine_upgrade'\n+  mongo_dir = '/var/lib/mongodb'\n+  hiera_file = '/etc/foreman-installer/custom-hiera.yaml'\n+  mongo_backup = '/var/tmp/mongo_backup'\n+  mongo_conf = '/etc/opt/rh/rh-mongodb34/mongod.conf'\n+\n+  # Create export directory and dump MongoDB\n+  logger.info 'Stopping Pulp services except MongoDB'\n+  Kafo::Helpers.execute('systemctl stop rh-mongodb34-mongod')\n+  FileUtils.mkdir_p(export_dir)\n+  File.chmod(0700, export_dir)\n+  logger.info \"Starting mongodump to #{export_dir}\"\n+  Kafo::Helpers.execute(\"mongodump --host localhost --out #{export_dir}\")\n+\n+  # Move datafiles out of MongoDB directory so it will start\n+  logger.info 'Export done, stopping MongoDB to remove old datafiles'\n+  Kafo::Helpers.execute('systemctl stop rh-mongodb34-mongod')\n+  logger.info \"Moving contents from #{mongo_dir} to #{mongo_backup}\"\n+  FileUtils.mkdir_p(mongo_backup)\n+  File.chmod(0700, mongo_backup)\n+  Kafo::Helpers.execute(\"mv #{mongo_dir}/* #{mongo_backup}\")\n+\n+  # Import the dump, fail and notify user of backup if restore does not work.\n+  logger.info 'Changing config to WiredTiger and starting restore.'\n+  Kafo::Helpers.execute(\"sed -i -e 's/mmapv1/wiredTiger/g' #{mongo_conf}\")\n+  Kafo::Helpers.execute(\"mongorestore --host localhost --db #{MONGO_DB_NAME} --quiet --dir #{export_dir}\")","path":"hooks/pre/31-mongo_storage_engine.rb","position":36,"original_position":36,"commit_id":"e2f8a14fd7b9101b07feb6c01c9c5145b0345811","original_commit_id":"e2f8a14fd7b9101b07feb6c01c9c5145b0345811","user":{"login":"chris1984","id":1518655,"node_id":"MDQ6VXNlcjE1MTg2NTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1518655?v=4","gravatar_id":"","url":"https://api.github.com/users/chris1984","html_url":"https://github.com/chris1984","followers_url":"https://api.github.com/users/chris1984/followers","following_url":"https://api.github.com/users/chris1984/following{/other_user}","gists_url":"https://api.github.com/users/chris1984/gists{/gist_id}","starred_url":"https://api.github.com/users/chris1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris1984/subscriptions","organizations_url":"https://api.github.com/users/chris1984/orgs","repos_url":"https://api.github.com/users/chris1984/repos","events_url":"https://api.github.com/users/chris1984/events{/privacy}","received_events_url":"https://api.github.com/users/chris1984/received_events","type":"User","site_admin":false},"body":"Good catch, just tried here and yeah it fails:\r\n\r\n~~~\r\n[root@centos7-katello-3-7 ~]# mongorestore dump/pulp_database/\r\n2018-06-25T18:44:11.888+0000\tFailed: error connecting to db server: no reachable servers\r\n~~~","created_at":"2018-06-25T18:45:01Z","updated_at":"2018-06-25T18:45:01Z","html_url":"https://github.com/Katello/katello-installer/pull/639#discussion_r197901754","pull_request_url":"https://api.github.com/repos/Katello/katello-installer/pulls/639","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Katello/katello-installer/pulls/comments/197901754"},"html":{"href":"https://github.com/Katello/katello-installer/pull/639#discussion_r197901754"},"pull_request":{"href":"https://api.github.com/repos/Katello/katello-installer/pulls/639"}},"in_reply_to_id":197880206},"pull_request":{"url":"https://api.github.com/repos/Katello/katello-installer/pulls/639","id":191127230,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMTI3MjMw","html_url":"https://github.com/Katello/katello-installer/pull/639","diff_url":"https://github.com/Katello/katello-installer/pull/639.diff","patch_url":"https://github.com/Katello/katello-installer/pull/639.patch","issue_url":"https://api.github.com/repos/Katello/katello-installer/issues/639","number":639,"state":"open","locked":false,"title":"Fixes #24066 - Add Mongo storage engine upgrade","user":{"login":"chris1984","id":1518655,"node_id":"MDQ6VXNlcjE1MTg2NTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1518655?v=4","gravatar_id":"","url":"https://api.github.com/users/chris1984","html_url":"https://github.com/chris1984","followers_url":"https://api.github.com/users/chris1984/followers","following_url":"https://api.github.com/users/chris1984/following{/other_user}","gists_url":"https://api.github.com/users/chris1984/gists{/gist_id}","starred_url":"https://api.github.com/users/chris1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris1984/subscriptions","organizations_url":"https://api.github.com/users/chris1984/orgs","repos_url":"https://api.github.com/users/chris1984/repos","events_url":"https://api.github.com/users/chris1984/events{/privacy}","received_events_url":"https://api.github.com/users/chris1984/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-29T12:20:20Z","updated_at":"2018-06-25T18:45:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28558fefff58531a4e78a5e5753109eba6aad73b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":119929299,"node_id":"MDU6TGFiZWwxMTk5MjkyOTk=","url":"https://api.github.com/repos/Katello/katello-installer/labels/Needs%20testing","name":"Needs testing","color":"fbca04","default":false},{"id":119929328,"node_id":"MDU6TGFiZWwxMTk5MjkzMjg=","url":"https://api.github.com/repos/Katello/katello-installer/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Katello/katello-installer/pulls/639/commits","review_comments_url":"https://api.github.com/repos/Katello/katello-installer/pulls/639/comments","review_comment_url":"https://api.github.com/repos/Katello/katello-installer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Katello/katello-installer/issues/639/comments","statuses_url":"https://api.github.com/repos/Katello/katello-installer/statuses/e2f8a14fd7b9101b07feb6c01c9c5145b0345811","head":{"label":"chris1984:engine-upgrade","ref":"engine-upgrade","sha":"e2f8a14fd7b9101b07feb6c01c9c5145b0345811","user":{"login":"chris1984","id":1518655,"node_id":"MDQ6VXNlcjE1MTg2NTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1518655?v=4","gravatar_id":"","url":"https://api.github.com/users/chris1984","html_url":"https://github.com/chris1984","followers_url":"https://api.github.com/users/chris1984/followers","following_url":"https://api.github.com/users/chris1984/following{/other_user}","gists_url":"https://api.github.com/users/chris1984/gists{/gist_id}","starred_url":"https://api.github.com/users/chris1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris1984/subscriptions","organizations_url":"https://api.github.com/users/chris1984/orgs","repos_url":"https://api.github.com/users/chris1984/repos","events_url":"https://api.github.com/users/chris1984/events{/privacy}","received_events_url":"https://api.github.com/users/chris1984/received_events","type":"User","site_admin":false},"repo":{"id":121655702,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE2NTU3MDI=","name":"katello-installer","full_name":"chris1984/katello-installer","owner":{"login":"chris1984","id":1518655,"node_id":"MDQ6VXNlcjE1MTg2NTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1518655?v=4","gravatar_id":"","url":"https://api.github.com/users/chris1984","html_url":"https://github.com/chris1984","followers_url":"https://api.github.com/users/chris1984/followers","following_url":"https://api.github.com/users/chris1984/following{/other_user}","gists_url":"https://api.github.com/users/chris1984/gists{/gist_id}","starred_url":"https://api.github.com/users/chris1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris1984/subscriptions","organizations_url":"https://api.github.com/users/chris1984/orgs","repos_url":"https://api.github.com/users/chris1984/repos","events_url":"https://api.github.com/users/chris1984/events{/privacy}","received_events_url":"https://api.github.com/users/chris1984/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chris1984/katello-installer","description":"Puppet-based installer for Katello","fork":true,"url":"https://api.github.com/repos/chris1984/katello-installer","forks_url":"https://api.github.com/repos/chris1984/katello-installer/forks","keys_url":"https://api.github.com/repos/chris1984/katello-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chris1984/katello-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chris1984/katello-installer/teams","hooks_url":"https://api.github.com/repos/chris1984/katello-installer/hooks","issue_events_url":"https://api.github.com/repos/chris1984/katello-installer/issues/events{/number}","events_url":"https://api.github.com/repos/chris1984/katello-installer/events","assignees_url":"https://api.github.com/repos/chris1984/katello-installer/assignees{/user}","branches_url":"https://api.github.com/repos/chris1984/katello-installer/branches{/branch}","tags_url":"https://api.github.com/repos/chris1984/katello-installer/tags","blobs_url":"https://api.github.com/repos/chris1984/katello-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chris1984/katello-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chris1984/katello-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/chris1984/katello-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chris1984/katello-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/chris1984/katello-installer/languages","stargazers_url":"https://api.github.com/repos/chris1984/katello-installer/stargazers","contributors_url":"https://api.github.com/repos/chris1984/katello-installer/contributors","subscribers_url":"https://api.github.com/repos/chris1984/katello-installer/subscribers","subscription_url":"https://api.github.com/repos/chris1984/katello-installer/subscription","commits_url":"https://api.github.com/repos/chris1984/katello-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/chris1984/katello-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/chris1984/katello-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/chris1984/katello-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/chris1984/katello-installer/contents/{+path}","compare_url":"https://api.github.com/repos/chris1984/katello-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chris1984/katello-installer/merges","archive_url":"https://api.github.com/repos/chris1984/katello-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chris1984/katello-installer/downloads","issues_url":"https://api.github.com/repos/chris1984/katello-installer/issues{/number}","pulls_url":"https://api.github.com/repos/chris1984/katello-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/chris1984/katello-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/chris1984/katello-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chris1984/katello-installer/labels{/name}","releases_url":"https://api.github.com/repos/chris1984/katello-installer/releases{/id}","deployments_url":"https://api.github.com/repos/chris1984/katello-installer/deployments","created_at":"2018-02-15T16:58:18Z","updated_at":"2018-06-01T07:57:30Z","pushed_at":"2018-06-25T15:29:36Z","git_url":"git://github.com/chris1984/katello-installer.git","ssh_url":"git@github.com:chris1984/katello-installer.git","clone_url":"https://github.com/chris1984/katello-installer.git","svn_url":"https://github.com/chris1984/katello-installer","homepage":"http://www.katello.org/","size":7588,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Katello:master","ref":"master","sha":"87b001637a8274c6432e8d0f2af33ff67bee58e4","user":{"login":"Katello","id":1316386,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTYzODY=","avatar_url":"https://avatars0.githubusercontent.com/u/1316386?v=4","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"repo":{"id":12600670,"node_id":"MDEwOlJlcG9zaXRvcnkxMjYwMDY3MA==","name":"katello-installer","full_name":"Katello/katello-installer","owner":{"login":"Katello","id":1316386,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTYzODY=","avatar_url":"https://avatars0.githubusercontent.com/u/1316386?v=4","gravatar_id":"","url":"https://api.github.com/users/Katello","html_url":"https://github.com/Katello","followers_url":"https://api.github.com/users/Katello/followers","following_url":"https://api.github.com/users/Katello/following{/other_user}","gists_url":"https://api.github.com/users/Katello/gists{/gist_id}","starred_url":"https://api.github.com/users/Katello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Katello/subscriptions","organizations_url":"https://api.github.com/users/Katello/orgs","repos_url":"https://api.github.com/users/Katello/repos","events_url":"https://api.github.com/users/Katello/events{/privacy}","received_events_url":"https://api.github.com/users/Katello/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Katello/katello-installer","description":"Puppet-based installer for Katello","fork":false,"url":"https://api.github.com/repos/Katello/katello-installer","forks_url":"https://api.github.com/repos/Katello/katello-installer/forks","keys_url":"https://api.github.com/repos/Katello/katello-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Katello/katello-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Katello/katello-installer/teams","hooks_url":"https://api.github.com/repos/Katello/katello-installer/hooks","issue_events_url":"https://api.github.com/repos/Katello/katello-installer/issues/events{/number}","events_url":"https://api.github.com/repos/Katello/katello-installer/events","assignees_url":"https://api.github.com/repos/Katello/katello-installer/assignees{/user}","branches_url":"https://api.github.com/repos/Katello/katello-installer/branches{/branch}","tags_url":"https://api.github.com/repos/Katello/katello-installer/tags","blobs_url":"https://api.github.com/repos/Katello/katello-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Katello/katello-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Katello/katello-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Katello/katello-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Katello/katello-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/Katello/katello-installer/languages","stargazers_url":"https://api.github.com/repos/Katello/katello-installer/stargazers","contributors_url":"https://api.github.com/repos/Katello/katello-installer/contributors","subscribers_url":"https://api.github.com/repos/Katello/katello-installer/subscribers","subscription_url":"https://api.github.com/repos/Katello/katello-installer/subscription","commits_url":"https://api.github.com/repos/Katello/katello-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Katello/katello-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Katello/katello-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Katello/katello-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Katello/katello-installer/contents/{+path}","compare_url":"https://api.github.com/repos/Katello/katello-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Katello/katello-installer/merges","archive_url":"https://api.github.com/repos/Katello/katello-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Katello/katello-installer/downloads","issues_url":"https://api.github.com/repos/Katello/katello-installer/issues{/number}","pulls_url":"https://api.github.com/repos/Katello/katello-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/Katello/katello-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/Katello/katello-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Katello/katello-installer/labels{/name}","releases_url":"https://api.github.com/repos/Katello/katello-installer/releases{/id}","deployments_url":"https://api.github.com/repos/Katello/katello-installer/deployments","created_at":"2013-09-04T19:56:27Z","updated_at":"2018-06-20T20:11:12Z","pushed_at":"2018-06-25T15:29:39Z","git_url":"git://github.com/Katello/katello-installer.git","ssh_url":"git@github.com:Katello/katello-installer.git","clone_url":"https://github.com/Katello/katello-installer.git","svn_url":"https://github.com/Katello/katello-installer","homepage":"http://www.katello.org/","size":7603,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":68,"open_issues":4,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Katello/katello-installer/pulls/639"},"html":{"href":"https://github.com/Katello/katello-installer/pull/639"},"issue":{"href":"https://api.github.com/repos/Katello/katello-installer/issues/639"},"comments":{"href":"https://api.github.com/repos/Katello/katello-installer/issues/639/comments"},"review_comments":{"href":"https://api.github.com/repos/Katello/katello-installer/pulls/639/comments"},"review_comment":{"href":"https://api.github.com/repos/Katello/katello-installer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Katello/katello-installer/pulls/639/commits"},"statuses":{"href":"https://api.github.com/repos/Katello/katello-installer/statuses/e2f8a14fd7b9101b07feb6c01c9c5145b0345811"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"chris1984"}}