{"action":"created","comment":{"url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/comments/204156661","pull_request_review_id":139195106,"id":204156661,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDE1NjY2MQ==","diff_hunk":"@@ -155,25 +154,15 @@ def maintenance_work_memory\n       def wal_keep_segments\n         # Convert to modifier % of available disk space on log drive in MB, then divide by 16MB\n         # If log location becomes configurable, the drive needs to also become configurable\n-\n+        puts node[\"filesystem\"][\"by_device\"]\n         modifier = { web: 0.50,\n                      oltp: 0.50,\n                      dw: 0.50,\n                      mixed: 0.50,\n                      desktop: 0.25,\n         }.fetch(workload)\n-\n-        (kb_available.to_f * modifier / 1024 / 16).round\n-      end\n-\n-      def kb_available\n-        return node[\"filesystem\"][mount_drive][\"kb_available\"] unless node[\"filesystem\"][mount_drive].nil?\n-\n-        kb = 0\n-        node[\"filesystem\"].each do |key, value|\n-          kb = value['kb_available'].to_i if value['kb_available'].to_i > kb\n-        end\n-        kb\n+          (node[\"filesystem\"][\"by_device\"][\"/dev/nvme0n1p1\"][\"kb_available\"].to_f * modifier / 1024 / 16).round\n+          #(node[\"filesystem\"][\"by_device\"][\"/dev/xvda1\"][\"kb_available\"].to_f * modifier / 1024 / 16).round","path":"chef_postgres/libraries/pg_config.rb","position":44,"original_position":44,"commit_id":"23cfd9098800e3a95183d8e3f889ba799983e717","original_commit_id":"23cfd9098800e3a95183d8e3f889ba799983e717","user":{"login":"sqlasylum","id":7681654,"node_id":"MDQ6VXNlcjc2ODE2NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7681654?v=4","gravatar_id":"","url":"https://api.github.com/users/sqlasylum","html_url":"https://github.com/sqlasylum","followers_url":"https://api.github.com/users/sqlasylum/followers","following_url":"https://api.github.com/users/sqlasylum/following{/other_user}","gists_url":"https://api.github.com/users/sqlasylum/gists{/gist_id}","starred_url":"https://api.github.com/users/sqlasylum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqlasylum/subscriptions","organizations_url":"https://api.github.com/users/sqlasylum/orgs","repos_url":"https://api.github.com/users/sqlasylum/repos","events_url":"https://api.github.com/users/sqlasylum/events{/privacy}","received_events_url":"https://api.github.com/users/sqlasylum/received_events","type":"User","site_admin":false},"body":"that was one thing i was hoping to discuss how we should deal with that. it wasn't changing before but now going to the new m5's it is.  so yes I'll have to migrate it to a variable that gets passed in.  \r\n","created_at":"2018-07-20T20:09:13Z","updated_at":"2018-07-20T20:09:13Z","html_url":"https://github.com/brianbroderick/chef_postgres/pull/12#discussion_r204156661","pull_request_url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/comments/204156661"},"html":{"href":"https://github.com/brianbroderick/chef_postgres/pull/12#discussion_r204156661"},"pull_request":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12"}},"in_reply_to_id":204154943},"pull_request":{"url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12","id":202886286,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyODg2Mjg2","html_url":"https://github.com/brianbroderick/chef_postgres/pull/12","diff_url":"https://github.com/brianbroderick/chef_postgres/pull/12.diff","patch_url":"https://github.com/brianbroderick/chef_postgres/pull/12.patch","issue_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/12","number":12,"state":"open","locked":false,"title":"Pg10update","user":{"login":"sqlasylum","id":7681654,"node_id":"MDQ6VXNlcjc2ODE2NTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7681654?v=4","gravatar_id":"","url":"https://api.github.com/users/sqlasylum","html_url":"https://github.com/sqlasylum","followers_url":"https://api.github.com/users/sqlasylum/followers","following_url":"https://api.github.com/users/sqlasylum/following{/other_user}","gists_url":"https://api.github.com/users/sqlasylum/gists{/gist_id}","starred_url":"https://api.github.com/users/sqlasylum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sqlasylum/subscriptions","organizations_url":"https://api.github.com/users/sqlasylum/orgs","repos_url":"https://api.github.com/users/sqlasylum/repos","events_url":"https://api.github.com/users/sqlasylum/events{/privacy}","received_events_url":"https://api.github.com/users/sqlasylum/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-20T15:40:35Z","updated_at":"2018-07-20T20:09:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fcc30eb5960d52bcd4de55b290ce9acd59fbe4f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12/commits","review_comments_url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12/comments","review_comment_url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/12/comments","statuses_url":"https://api.github.com/repos/brianbroderick/chef_postgres/statuses/23cfd9098800e3a95183d8e3f889ba799983e717","head":{"label":"brianbroderick:pg10update","ref":"pg10update","sha":"23cfd9098800e3a95183d8e3f889ba799983e717","user":{"login":"brianbroderick","id":7585181,"node_id":"MDQ6VXNlcjc1ODUxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7585181?v=4","gravatar_id":"","url":"https://api.github.com/users/brianbroderick","html_url":"https://github.com/brianbroderick","followers_url":"https://api.github.com/users/brianbroderick/followers","following_url":"https://api.github.com/users/brianbroderick/following{/other_user}","gists_url":"https://api.github.com/users/brianbroderick/gists{/gist_id}","starred_url":"https://api.github.com/users/brianbroderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianbroderick/subscriptions","organizations_url":"https://api.github.com/users/brianbroderick/orgs","repos_url":"https://api.github.com/users/brianbroderick/repos","events_url":"https://api.github.com/users/brianbroderick/events{/privacy}","received_events_url":"https://api.github.com/users/brianbroderick/received_events","type":"User","site_admin":false},"repo":{"id":92872905,"node_id":"MDEwOlJlcG9zaXRvcnk5Mjg3MjkwNQ==","name":"chef_postgres","full_name":"brianbroderick/chef_postgres","owner":{"login":"brianbroderick","id":7585181,"node_id":"MDQ6VXNlcjc1ODUxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7585181?v=4","gravatar_id":"","url":"https://api.github.com/users/brianbroderick","html_url":"https://github.com/brianbroderick","followers_url":"https://api.github.com/users/brianbroderick/followers","following_url":"https://api.github.com/users/brianbroderick/following{/other_user}","gists_url":"https://api.github.com/users/brianbroderick/gists{/gist_id}","starred_url":"https://api.github.com/users/brianbroderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianbroderick/subscriptions","organizations_url":"https://api.github.com/users/brianbroderick/orgs","repos_url":"https://api.github.com/users/brianbroderick/repos","events_url":"https://api.github.com/users/brianbroderick/events{/privacy}","received_events_url":"https://api.github.com/users/brianbroderick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianbroderick/chef_postgres","description":"Recipes for installing PG on Ubuntu.  Design choices based on needs of chef solo and standard AWS Opsworks","fork":false,"url":"https://api.github.com/repos/brianbroderick/chef_postgres","forks_url":"https://api.github.com/repos/brianbroderick/chef_postgres/forks","keys_url":"https://api.github.com/repos/brianbroderick/chef_postgres/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianbroderick/chef_postgres/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianbroderick/chef_postgres/teams","hooks_url":"https://api.github.com/repos/brianbroderick/chef_postgres/hooks","issue_events_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/events{/number}","events_url":"https://api.github.com/repos/brianbroderick/chef_postgres/events","assignees_url":"https://api.github.com/repos/brianbroderick/chef_postgres/assignees{/user}","branches_url":"https://api.github.com/repos/brianbroderick/chef_postgres/branches{/branch}","tags_url":"https://api.github.com/repos/brianbroderick/chef_postgres/tags","blobs_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianbroderick/chef_postgres/statuses/{sha}","languages_url":"https://api.github.com/repos/brianbroderick/chef_postgres/languages","stargazers_url":"https://api.github.com/repos/brianbroderick/chef_postgres/stargazers","contributors_url":"https://api.github.com/repos/brianbroderick/chef_postgres/contributors","subscribers_url":"https://api.github.com/repos/brianbroderick/chef_postgres/subscribers","subscription_url":"https://api.github.com/repos/brianbroderick/chef_postgres/subscription","commits_url":"https://api.github.com/repos/brianbroderick/chef_postgres/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianbroderick/chef_postgres/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianbroderick/chef_postgres/contents/{+path}","compare_url":"https://api.github.com/repos/brianbroderick/chef_postgres/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianbroderick/chef_postgres/merges","archive_url":"https://api.github.com/repos/brianbroderick/chef_postgres/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianbroderick/chef_postgres/downloads","issues_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues{/number}","pulls_url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls{/number}","milestones_url":"https://api.github.com/repos/brianbroderick/chef_postgres/milestones{/number}","notifications_url":"https://api.github.com/repos/brianbroderick/chef_postgres/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianbroderick/chef_postgres/labels{/name}","releases_url":"https://api.github.com/repos/brianbroderick/chef_postgres/releases{/id}","deployments_url":"https://api.github.com/repos/brianbroderick/chef_postgres/deployments","created_at":"2017-05-30T20:22:47Z","updated_at":"2018-04-11T14:51:02Z","pushed_at":"2018-07-20T17:55:25Z","git_url":"git://github.com/brianbroderick/chef_postgres.git","ssh_url":"git@github.com:brianbroderick/chef_postgres.git","clone_url":"https://github.com/brianbroderick/chef_postgres.git","svn_url":"https://github.com/brianbroderick/chef_postgres","homepage":"","size":396,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"brianbroderick:master","ref":"master","sha":"e1e4d56a69d8659a5e6dfbcc0668500e365fedaf","user":{"login":"brianbroderick","id":7585181,"node_id":"MDQ6VXNlcjc1ODUxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7585181?v=4","gravatar_id":"","url":"https://api.github.com/users/brianbroderick","html_url":"https://github.com/brianbroderick","followers_url":"https://api.github.com/users/brianbroderick/followers","following_url":"https://api.github.com/users/brianbroderick/following{/other_user}","gists_url":"https://api.github.com/users/brianbroderick/gists{/gist_id}","starred_url":"https://api.github.com/users/brianbroderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianbroderick/subscriptions","organizations_url":"https://api.github.com/users/brianbroderick/orgs","repos_url":"https://api.github.com/users/brianbroderick/repos","events_url":"https://api.github.com/users/brianbroderick/events{/privacy}","received_events_url":"https://api.github.com/users/brianbroderick/received_events","type":"User","site_admin":false},"repo":{"id":92872905,"node_id":"MDEwOlJlcG9zaXRvcnk5Mjg3MjkwNQ==","name":"chef_postgres","full_name":"brianbroderick/chef_postgres","owner":{"login":"brianbroderick","id":7585181,"node_id":"MDQ6VXNlcjc1ODUxODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7585181?v=4","gravatar_id":"","url":"https://api.github.com/users/brianbroderick","html_url":"https://github.com/brianbroderick","followers_url":"https://api.github.com/users/brianbroderick/followers","following_url":"https://api.github.com/users/brianbroderick/following{/other_user}","gists_url":"https://api.github.com/users/brianbroderick/gists{/gist_id}","starred_url":"https://api.github.com/users/brianbroderick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianbroderick/subscriptions","organizations_url":"https://api.github.com/users/brianbroderick/orgs","repos_url":"https://api.github.com/users/brianbroderick/repos","events_url":"https://api.github.com/users/brianbroderick/events{/privacy}","received_events_url":"https://api.github.com/users/brianbroderick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianbroderick/chef_postgres","description":"Recipes for installing PG on Ubuntu.  Design choices based on needs of chef solo and standard AWS Opsworks","fork":false,"url":"https://api.github.com/repos/brianbroderick/chef_postgres","forks_url":"https://api.github.com/repos/brianbroderick/chef_postgres/forks","keys_url":"https://api.github.com/repos/brianbroderick/chef_postgres/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianbroderick/chef_postgres/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianbroderick/chef_postgres/teams","hooks_url":"https://api.github.com/repos/brianbroderick/chef_postgres/hooks","issue_events_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/events{/number}","events_url":"https://api.github.com/repos/brianbroderick/chef_postgres/events","assignees_url":"https://api.github.com/repos/brianbroderick/chef_postgres/assignees{/user}","branches_url":"https://api.github.com/repos/brianbroderick/chef_postgres/branches{/branch}","tags_url":"https://api.github.com/repos/brianbroderick/chef_postgres/tags","blobs_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianbroderick/chef_postgres/statuses/{sha}","languages_url":"https://api.github.com/repos/brianbroderick/chef_postgres/languages","stargazers_url":"https://api.github.com/repos/brianbroderick/chef_postgres/stargazers","contributors_url":"https://api.github.com/repos/brianbroderick/chef_postgres/contributors","subscribers_url":"https://api.github.com/repos/brianbroderick/chef_postgres/subscribers","subscription_url":"https://api.github.com/repos/brianbroderick/chef_postgres/subscription","commits_url":"https://api.github.com/repos/brianbroderick/chef_postgres/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianbroderick/chef_postgres/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianbroderick/chef_postgres/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianbroderick/chef_postgres/contents/{+path}","compare_url":"https://api.github.com/repos/brianbroderick/chef_postgres/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianbroderick/chef_postgres/merges","archive_url":"https://api.github.com/repos/brianbroderick/chef_postgres/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianbroderick/chef_postgres/downloads","issues_url":"https://api.github.com/repos/brianbroderick/chef_postgres/issues{/number}","pulls_url":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls{/number}","milestones_url":"https://api.github.com/repos/brianbroderick/chef_postgres/milestones{/number}","notifications_url":"https://api.github.com/repos/brianbroderick/chef_postgres/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianbroderick/chef_postgres/labels{/name}","releases_url":"https://api.github.com/repos/brianbroderick/chef_postgres/releases{/id}","deployments_url":"https://api.github.com/repos/brianbroderick/chef_postgres/deployments","created_at":"2017-05-30T20:22:47Z","updated_at":"2018-04-11T14:51:02Z","pushed_at":"2018-07-20T17:55:25Z","git_url":"git://github.com/brianbroderick/chef_postgres.git","ssh_url":"git@github.com:brianbroderick/chef_postgres.git","clone_url":"https://github.com/brianbroderick/chef_postgres.git","svn_url":"https://github.com/brianbroderick/chef_postgres","homepage":"","size":396,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12"},"html":{"href":"https://github.com/brianbroderick/chef_postgres/pull/12"},"issue":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/12"},"comments":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/brianbroderick/chef_postgres/statuses/23cfd9098800e3a95183d8e3f889ba799983e717"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sqlasylum"}}