{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/83922426","pull_request_review_id":4732068,"id":83922426,"diff_hunk":"@@ -0,0 +1,73 @@\n+require 'active_record'\n+require 'active_support/core_ext'\n+require 'linux_admin'\n+require 'pathname'\n+require 'util/miq-password'\n+require 'fileutils'\n+require 'appliance_console/errors'\n+require 'appliance_console/logging'\n+require 'appliance_console/logical_disk_volume'\n+require 'appliance_console/prompts'\n+require 'appliance_console/utilities'\n+\n+RAILS_ROOT ||= Pathname.new(__dir__).join(\"../../../\")\n+\n+module ApplianceConsole\n+  class LogfileConfiguration\n+    LOGFILE_DIRECTORY = Pathname.new(\"/var/www/miq/vmdb/log\").freeze\n+    LOGFILE_NAME = \"miq_logs\".freeze\n+\n+    attr_accessor :disk\n+\n+    include ApplianceConsole::Logging\n+\n+    def initialize\n+      self.disk = nil\n+    end\n+\n+    def activate\n+      stop_evm\n+      initialize_logfile_disk\n+      restart_evm\n+    end\n+\n+    def ask_questions\n+      clear_screen\n+      return false unless use_new_disk\n+      choose_disk\n+      true\n+    end\n+\n+    private\n+\n+    def use_new_disk\n+      agree(\"Configure a new logfile disk volume? (Y/N):\")\n+    end\n+\n+    def choose_disk\n+      self.disk = ask_for_disk(\"logfile disk\")\n+    end\n+\n+    def initialize_logfile_disk\n+      say 'Initializing logfile disk'\n+      LogicalDiskVolume.new(:disk => disk, :mount_point => LOGFILE_DIRECTORY, :name => LOGFILE_NAME).setup\n+      true\n+    end\n+\n+    def restart_evm","path":"gems/pending/appliance_console/logfile_configuration.rb","position":57,"original_position":57,"commit_id":"910f8d8a0fc72fd00864011c4ccae1cefa712f11","original_commit_id":"910f8d8a0fc72fd00864011c4ccae1cefa712f11","user":{"login":"carbonin","id":12697904,"avatar_url":"https://avatars.githubusercontent.com/u/12697904?v=3","gravatar_id":"","url":"https://api.github.com/users/carbonin","html_url":"https://github.com/carbonin","followers_url":"https://api.github.com/users/carbonin/followers","following_url":"https://api.github.com/users/carbonin/following{/other_user}","gists_url":"https://api.github.com/users/carbonin/gists{/gist_id}","starred_url":"https://api.github.com/users/carbonin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carbonin/subscriptions","organizations_url":"https://api.github.com/users/carbonin/orgs","repos_url":"https://api.github.com/users/carbonin/repos","events_url":"https://api.github.com/users/carbonin/events{/privacy}","received_events_url":"https://api.github.com/users/carbonin/received_events","type":"User","site_admin":false},"body":"If this is just calling `.start` I would call it `start_evm` rather than `restart_evm`","created_at":"2016-10-18T18:39:37Z","updated_at":"2016-10-18T18:47:05Z","html_url":"https://github.com/ManageIQ/manageiq/pull/12027#discussion_r83922426","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/83922426"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/12027#discussion_r83922426"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027","id":89840209,"html_url":"https://github.com/ManageIQ/manageiq/pull/12027","diff_url":"https://github.com/ManageIQ/manageiq/pull/12027.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/12027.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/12027","number":12027,"state":"open","locked":false,"title":"Add the ability to use a different disk for storing log files","user":{"login":"jvlcek","id":729572,"avatar_url":"https://avatars.githubusercontent.com/u/729572?v=3","gravatar_id":"","url":"https://api.github.com/users/jvlcek","html_url":"https://github.com/jvlcek","followers_url":"https://api.github.com/users/jvlcek/followers","following_url":"https://api.github.com/users/jvlcek/following{/other_user}","gists_url":"https://api.github.com/users/jvlcek/gists{/gist_id}","starred_url":"https://api.github.com/users/jvlcek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvlcek/subscriptions","organizations_url":"https://api.github.com/users/jvlcek/orgs","repos_url":"https://api.github.com/users/jvlcek/repos","events_url":"https://api.github.com/users/jvlcek/events{/privacy}","received_events_url":"https://api.github.com/users/jvlcek/received_events","type":"User","site_admin":false},"body":"This Pull Requests adds functionality to the appliance_console enabling the configuration of an additional, likely larger, disk for storing EVM `.log` files. This change will eventually allow customers to save more older logfile rotations.\r\n\r\nNo attempt is made to repurpose the storage that had been targeted for `.log` file storage This approach was approved by John Hardy.\r\n\r\n# Two new classes are introduced: \r\n\r\n- `LogfileConfiguration`\r\n- `LogicalDiskVolume`\r\n\r\n_**class `LogfileConfiguration`**_ manages the configuration of a new logfile disk.\r\n\r\nIn the near future additional functionality will be added. For example to allow the user to specify how many logrotations can be saved beyond the current default of 2 weeks, for 14 daily rotations.\r\n\r\n_**class `LogicalDiskVolume`**_ is simply a minor refactoring of code moved from the existing class, `InternalDatabaseConfiguration`.\r\n\r\nThis will allow the code to be shared with class `LogfileConfiguration`\r\n\r\n# Two new spec files are introduced\r\n\r\n- `gems/pending/spec/appliance_console/logical_disk_volume_spec.rb`\r\n- `gems/pending/spec/appliance_console/logfile_configuration_spec.rb`\r\n\r\nThese will  exercise the two new classes  `LogfileConfiguration` and `LogicalDiskVolume`\r\n\r\nThe spec file `gems/pending/spec/appliance_console/logical_disk_volume_spec.rb` comprise test refactored from the existing `gems/pending/spec/appliance_console/internal_database_configuration_spec.rb` and more extensive tests.\r\n\r\nLinks\r\n------\r\n\r\n* https://www.pivotaltracker.com/n/projects/1608513/stories/126710021\r\n","created_at":"2016-10-18T15:29:28Z","updated_at":"2016-10-18T18:47:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a448172ad1f0e91eb11017668c2089e858a90dba","assignee":{"login":"gtanzillo","id":76593,"avatar_url":"https://avatars.githubusercontent.com/u/76593?v=3","gravatar_id":"","url":"https://api.github.com/users/gtanzillo","html_url":"https://github.com/gtanzillo","followers_url":"https://api.github.com/users/gtanzillo/followers","following_url":"https://api.github.com/users/gtanzillo/following{/other_user}","gists_url":"https://api.github.com/users/gtanzillo/gists{/gist_id}","starred_url":"https://api.github.com/users/gtanzillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtanzillo/subscriptions","organizations_url":"https://api.github.com/users/gtanzillo/orgs","repos_url":"https://api.github.com/users/gtanzillo/repos","events_url":"https://api.github.com/users/gtanzillo/events{/privacy}","received_events_url":"https://api.github.com/users/gtanzillo/received_events","type":"User","site_admin":false},"assignees":[{"login":"gtanzillo","id":76593,"avatar_url":"https://avatars.githubusercontent.com/u/76593?v=3","gravatar_id":"","url":"https://api.github.com/users/gtanzillo","html_url":"https://github.com/gtanzillo","followers_url":"https://api.github.com/users/gtanzillo/followers","following_url":"https://api.github.com/users/gtanzillo/following{/other_user}","gists_url":"https://api.github.com/users/gtanzillo/gists{/gist_id}","starred_url":"https://api.github.com/users/gtanzillo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gtanzillo/subscriptions","organizations_url":"https://api.github.com/users/gtanzillo/orgs","repos_url":"https://api.github.com/users/gtanzillo/repos","events_url":"https://api.github.com/users/gtanzillo/events{/privacy}","received_events_url":"https://api.github.com/users/gtanzillo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/12027/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/910f8d8a0fc72fd00864011c4ccae1cefa712f11","head":{"label":"jvlcek:new_log_disk","ref":"new_log_disk","sha":"910f8d8a0fc72fd00864011c4ccae1cefa712f11","user":{"login":"jvlcek","id":729572,"avatar_url":"https://avatars.githubusercontent.com/u/729572?v=3","gravatar_id":"","url":"https://api.github.com/users/jvlcek","html_url":"https://github.com/jvlcek","followers_url":"https://api.github.com/users/jvlcek/followers","following_url":"https://api.github.com/users/jvlcek/following{/other_user}","gists_url":"https://api.github.com/users/jvlcek/gists{/gist_id}","starred_url":"https://api.github.com/users/jvlcek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvlcek/subscriptions","organizations_url":"https://api.github.com/users/jvlcek/orgs","repos_url":"https://api.github.com/users/jvlcek/repos","events_url":"https://api.github.com/users/jvlcek/events{/privacy}","received_events_url":"https://api.github.com/users/jvlcek/received_events","type":"User","site_admin":false},"repo":{"id":20890511,"name":"manageiq","full_name":"jvlcek/manageiq","owner":{"login":"jvlcek","id":729572,"avatar_url":"https://avatars.githubusercontent.com/u/729572?v=3","gravatar_id":"","url":"https://api.github.com/users/jvlcek","html_url":"https://github.com/jvlcek","followers_url":"https://api.github.com/users/jvlcek/followers","following_url":"https://api.github.com/users/jvlcek/following{/other_user}","gists_url":"https://api.github.com/users/jvlcek/gists{/gist_id}","starred_url":"https://api.github.com/users/jvlcek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvlcek/subscriptions","organizations_url":"https://api.github.com/users/jvlcek/orgs","repos_url":"https://api.github.com/users/jvlcek/repos","events_url":"https://api.github.com/users/jvlcek/events{/privacy}","received_events_url":"https://api.github.com/users/jvlcek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jvlcek/manageiq","description":"ManageIQ Cloud Management Platform","fork":true,"url":"https://api.github.com/repos/jvlcek/manageiq","forks_url":"https://api.github.com/repos/jvlcek/manageiq/forks","keys_url":"https://api.github.com/repos/jvlcek/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jvlcek/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jvlcek/manageiq/teams","hooks_url":"https://api.github.com/repos/jvlcek/manageiq/hooks","issue_events_url":"https://api.github.com/repos/jvlcek/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/jvlcek/manageiq/events","assignees_url":"https://api.github.com/repos/jvlcek/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/jvlcek/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/jvlcek/manageiq/tags","blobs_url":"https://api.github.com/repos/jvlcek/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jvlcek/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jvlcek/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/jvlcek/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jvlcek/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/jvlcek/manageiq/languages","stargazers_url":"https://api.github.com/repos/jvlcek/manageiq/stargazers","contributors_url":"https://api.github.com/repos/jvlcek/manageiq/contributors","subscribers_url":"https://api.github.com/repos/jvlcek/manageiq/subscribers","subscription_url":"https://api.github.com/repos/jvlcek/manageiq/subscription","commits_url":"https://api.github.com/repos/jvlcek/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/jvlcek/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/jvlcek/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/jvlcek/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/jvlcek/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/jvlcek/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jvlcek/manageiq/merges","archive_url":"https://api.github.com/repos/jvlcek/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jvlcek/manageiq/downloads","issues_url":"https://api.github.com/repos/jvlcek/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/jvlcek/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/jvlcek/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/jvlcek/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jvlcek/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/jvlcek/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/jvlcek/manageiq/deployments","created_at":"2014-06-16T15:44:01Z","updated_at":"2016-01-22T19:11:04Z","pushed_at":"2016-10-18T18:26:13Z","git_url":"git://github.com/jvlcek/manageiq.git","ssh_url":"git@github.com:jvlcek/manageiq.git","clone_url":"https://github.com/jvlcek/manageiq.git","svn_url":"https://github.com/jvlcek/manageiq","homepage":null,"size":162026,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"415cd44fd97d51ffb958d5b6235009861f319fa6","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Open-Source Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2016-10-17T14:19:43Z","pushed_at":"2016-10-18T18:44:37Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":213336,"stargazers_count":338,"watchers_count":338,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":370,"mirror_url":null,"open_issues_count":866,"forks":370,"open_issues":866,"watchers":338,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/12027"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/12027"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/12027/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/12027/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/910f8d8a0fc72fd00864011c4ccae1cefa712f11"}}}}
{"actor":{"display_login":"carbonin"}}