{"action":"created","comment":{"url":"https://api.github.com/repos/rancher/python-agent/pulls/comments/66313120","id":66313120,"diff_hunk":"@@ -763,6 +765,25 @@ def _setup_hostname(self, create_config, instance):\n         except (KeyError, AttributeError):\n             pass\n \n+    def _setup_iops(self, config, instance):\n+        log.info('setting up iops for docker container named: %s',\n+                 instance.name)\n+        try:\n+            for readIops in instance.data['fields']['blkioDeviceReadIOps']:\n+                readIopsDic = {}\n+                readIopsDic['Path'] = readIops['Path']\n+                readIopsDic['Rate'] = int(readIops['Rate'])\n+                log.info(\"appending readIops: %s\", str(readIopsDic))\n+                config['BlkioDeviceReadIOps'] = [readIopsDic]","path":"cattle/plugins/docker/compute.py","position":22,"original_position":22,"commit_id":"68a87318fc5f811570fa99e711a23ccecdafe423","original_commit_id":"68a87318fc5f811570fa99e711a23ccecdafe423","user":{"login":"jimengliu","id":17127678,"avatar_url":"https://avatars.githubusercontent.com/u/17127678?v=3","gravatar_id":"","url":"https://api.github.com/users/jimengliu","html_url":"https://github.com/jimengliu","followers_url":"https://api.github.com/users/jimengliu/followers","following_url":"https://api.github.com/users/jimengliu/following{/other_user}","gists_url":"https://api.github.com/users/jimengliu/gists{/gist_id}","starred_url":"https://api.github.com/users/jimengliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimengliu/subscriptions","organizations_url":"https://api.github.com/users/jimengliu/orgs","repos_url":"https://api.github.com/users/jimengliu/repos","events_url":"https://api.github.com/users/jimengliu/events{/privacy}","received_events_url":"https://api.github.com/users/jimengliu/received_events","type":"User","site_admin":false},"body":"nice catch, I was testing one item. This line \"config['BlkioDeviceReadIOps'] = [readIopsDic]\" needs to be append. (my log already saying that, but code does not do). I will change this.","created_at":"2016-06-08T18:32:58Z","updated_at":"2016-06-08T18:32:58Z","html_url":"https://github.com/rancher/python-agent/pull/239#discussion_r66313120","pull_request_url":"https://api.github.com/repos/rancher/python-agent/pulls/239","_links":{"self":{"href":"https://api.github.com/repos/rancher/python-agent/pulls/comments/66313120"},"html":{"href":"https://github.com/rancher/python-agent/pull/239#discussion_r66313120"},"pull_request":{"href":"https://api.github.com/repos/rancher/python-agent/pulls/239"}}},"pull_request":{"url":"https://api.github.com/repos/rancher/python-agent/pulls/239","id":71783209,"html_url":"https://github.com/rancher/python-agent/pull/239","diff_url":"https://github.com/rancher/python-agent/pull/239.diff","patch_url":"https://github.com/rancher/python-agent/pull/239.patch","issue_url":"https://api.github.com/repos/rancher/python-agent/issues/239","number":239,"state":"open","locked":false,"title":"add iops retrieval in python-agent","user":{"login":"jimengliu","id":17127678,"avatar_url":"https://avatars.githubusercontent.com/u/17127678?v=3","gravatar_id":"","url":"https://api.github.com/users/jimengliu","html_url":"https://github.com/jimengliu","followers_url":"https://api.github.com/users/jimengliu/followers","following_url":"https://api.github.com/users/jimengliu/following{/other_user}","gists_url":"https://api.github.com/users/jimengliu/gists{/gist_id}","starred_url":"https://api.github.com/users/jimengliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimengliu/subscriptions","organizations_url":"https://api.github.com/users/jimengliu/orgs","repos_url":"https://api.github.com/users/jimengliu/repos","events_url":"https://api.github.com/users/jimengliu/events{/privacy}","received_events_url":"https://api.github.com/users/jimengliu/received_events","type":"User","site_admin":false},"body":"1. assuming fio tool has been run inside /var/lib/docker/tmp folder using file operation, not block operation. Run 2 times, with read I/O and write I/O each.\r\n2. assuming the fio runs will create result files as \"read.json\" and \"write.json\" at /var/lib/rancher/state.\r\n3. the code is to get iops for both read and write and let ping reply carry it back\r\n@cjellick @ibuildthecloud ","created_at":"2016-05-27T23:10:03Z","updated_at":"2016-06-08T18:32:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36b7eff1bf5c5a77bba0da8d42018b84683e4b1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rancher/python-agent/pulls/239/commits","review_comments_url":"https://api.github.com/repos/rancher/python-agent/pulls/239/comments","review_comment_url":"https://api.github.com/repos/rancher/python-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rancher/python-agent/issues/239/comments","statuses_url":"https://api.github.com/repos/rancher/python-agent/statuses/68a87318fc5f811570fa99e711a23ccecdafe423","head":{"label":"jimengliu:master","ref":"master","sha":"68a87318fc5f811570fa99e711a23ccecdafe423","user":{"login":"jimengliu","id":17127678,"avatar_url":"https://avatars.githubusercontent.com/u/17127678?v=3","gravatar_id":"","url":"https://api.github.com/users/jimengliu","html_url":"https://github.com/jimengliu","followers_url":"https://api.github.com/users/jimengliu/followers","following_url":"https://api.github.com/users/jimengliu/following{/other_user}","gists_url":"https://api.github.com/users/jimengliu/gists{/gist_id}","starred_url":"https://api.github.com/users/jimengliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimengliu/subscriptions","organizations_url":"https://api.github.com/users/jimengliu/orgs","repos_url":"https://api.github.com/users/jimengliu/repos","events_url":"https://api.github.com/users/jimengliu/events{/privacy}","received_events_url":"https://api.github.com/users/jimengliu/received_events","type":"User","site_admin":false},"repo":{"id":56177273,"name":"python-agent","full_name":"jimengliu/python-agent","owner":{"login":"jimengliu","id":17127678,"avatar_url":"https://avatars.githubusercontent.com/u/17127678?v=3","gravatar_id":"","url":"https://api.github.com/users/jimengliu","html_url":"https://github.com/jimengliu","followers_url":"https://api.github.com/users/jimengliu/followers","following_url":"https://api.github.com/users/jimengliu/following{/other_user}","gists_url":"https://api.github.com/users/jimengliu/gists{/gist_id}","starred_url":"https://api.github.com/users/jimengliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimengliu/subscriptions","organizations_url":"https://api.github.com/users/jimengliu/orgs","repos_url":"https://api.github.com/users/jimengliu/repos","events_url":"https://api.github.com/users/jimengliu/events{/privacy}","received_events_url":"https://api.github.com/users/jimengliu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimengliu/python-agent","description":"Python agent for Rancher","fork":true,"url":"https://api.github.com/repos/jimengliu/python-agent","forks_url":"https://api.github.com/repos/jimengliu/python-agent/forks","keys_url":"https://api.github.com/repos/jimengliu/python-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimengliu/python-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimengliu/python-agent/teams","hooks_url":"https://api.github.com/repos/jimengliu/python-agent/hooks","issue_events_url":"https://api.github.com/repos/jimengliu/python-agent/issues/events{/number}","events_url":"https://api.github.com/repos/jimengliu/python-agent/events","assignees_url":"https://api.github.com/repos/jimengliu/python-agent/assignees{/user}","branches_url":"https://api.github.com/repos/jimengliu/python-agent/branches{/branch}","tags_url":"https://api.github.com/repos/jimengliu/python-agent/tags","blobs_url":"https://api.github.com/repos/jimengliu/python-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimengliu/python-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimengliu/python-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimengliu/python-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimengliu/python-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/jimengliu/python-agent/languages","stargazers_url":"https://api.github.com/repos/jimengliu/python-agent/stargazers","contributors_url":"https://api.github.com/repos/jimengliu/python-agent/contributors","subscribers_url":"https://api.github.com/repos/jimengliu/python-agent/subscribers","subscription_url":"https://api.github.com/repos/jimengliu/python-agent/subscription","commits_url":"https://api.github.com/repos/jimengliu/python-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimengliu/python-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimengliu/python-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimengliu/python-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimengliu/python-agent/contents/{+path}","compare_url":"https://api.github.com/repos/jimengliu/python-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimengliu/python-agent/merges","archive_url":"https://api.github.com/repos/jimengliu/python-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimengliu/python-agent/downloads","issues_url":"https://api.github.com/repos/jimengliu/python-agent/issues{/number}","pulls_url":"https://api.github.com/repos/jimengliu/python-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/jimengliu/python-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/jimengliu/python-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimengliu/python-agent/labels{/name}","releases_url":"https://api.github.com/repos/jimengliu/python-agent/releases{/id}","deployments_url":"https://api.github.com/repos/jimengliu/python-agent/deployments","created_at":"2016-04-13T18:43:50Z","updated_at":"2016-04-13T18:43:51Z","pushed_at":"2016-06-08T17:25:35Z","git_url":"git://github.com/jimengliu/python-agent.git","ssh_url":"git@github.com:jimengliu/python-agent.git","clone_url":"https://github.com/jimengliu/python-agent.git","svn_url":"https://github.com/jimengliu/python-agent","homepage":null,"size":5627,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"rancher:master","ref":"master","sha":"174f137a9c43d210a3c6480f7e9b3ef51fdd830e","user":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"repo":{"id":26792702,"name":"python-agent","full_name":"rancher/python-agent","owner":{"login":"rancher","id":9343010,"avatar_url":"https://avatars.githubusercontent.com/u/9343010?v=3","gravatar_id":"","url":"https://api.github.com/users/rancher","html_url":"https://github.com/rancher","followers_url":"https://api.github.com/users/rancher/followers","following_url":"https://api.github.com/users/rancher/following{/other_user}","gists_url":"https://api.github.com/users/rancher/gists{/gist_id}","starred_url":"https://api.github.com/users/rancher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rancher/subscriptions","organizations_url":"https://api.github.com/users/rancher/orgs","repos_url":"https://api.github.com/users/rancher/repos","events_url":"https://api.github.com/users/rancher/events{/privacy}","received_events_url":"https://api.github.com/users/rancher/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rancher/python-agent","description":"Python agent for Rancher","fork":false,"url":"https://api.github.com/repos/rancher/python-agent","forks_url":"https://api.github.com/repos/rancher/python-agent/forks","keys_url":"https://api.github.com/repos/rancher/python-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rancher/python-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rancher/python-agent/teams","hooks_url":"https://api.github.com/repos/rancher/python-agent/hooks","issue_events_url":"https://api.github.com/repos/rancher/python-agent/issues/events{/number}","events_url":"https://api.github.com/repos/rancher/python-agent/events","assignees_url":"https://api.github.com/repos/rancher/python-agent/assignees{/user}","branches_url":"https://api.github.com/repos/rancher/python-agent/branches{/branch}","tags_url":"https://api.github.com/repos/rancher/python-agent/tags","blobs_url":"https://api.github.com/repos/rancher/python-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rancher/python-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rancher/python-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/rancher/python-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rancher/python-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/rancher/python-agent/languages","stargazers_url":"https://api.github.com/repos/rancher/python-agent/stargazers","contributors_url":"https://api.github.com/repos/rancher/python-agent/contributors","subscribers_url":"https://api.github.com/repos/rancher/python-agent/subscribers","subscription_url":"https://api.github.com/repos/rancher/python-agent/subscription","commits_url":"https://api.github.com/repos/rancher/python-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/rancher/python-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/rancher/python-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/rancher/python-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/rancher/python-agent/contents/{+path}","compare_url":"https://api.github.com/repos/rancher/python-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rancher/python-agent/merges","archive_url":"https://api.github.com/repos/rancher/python-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rancher/python-agent/downloads","issues_url":"https://api.github.com/repos/rancher/python-agent/issues{/number}","pulls_url":"https://api.github.com/repos/rancher/python-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/rancher/python-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/rancher/python-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rancher/python-agent/labels{/name}","releases_url":"https://api.github.com/repos/rancher/python-agent/releases{/id}","deployments_url":"https://api.github.com/repos/rancher/python-agent/deployments","created_at":"2014-11-18T05:00:53Z","updated_at":"2016-02-20T23:56:19Z","pushed_at":"2016-06-08T17:25:36Z","git_url":"git://github.com/rancher/python-agent.git","ssh_url":"git@github.com:rancher/python-agent.git","clone_url":"https://github.com/rancher/python-agent.git","svn_url":"https://github.com/rancher/python-agent","homepage":null,"size":5807,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rancher/python-agent/pulls/239"},"html":{"href":"https://github.com/rancher/python-agent/pull/239"},"issue":{"href":"https://api.github.com/repos/rancher/python-agent/issues/239"},"comments":{"href":"https://api.github.com/repos/rancher/python-agent/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/rancher/python-agent/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/rancher/python-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rancher/python-agent/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/rancher/python-agent/statuses/68a87318fc5f811570fa99e711a23ccecdafe423"}}}}
{"actor":{"display_login":"jimengliu"}}