{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/comments/243164295","pull_request_review_id":186859311,"id":243164295,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzE2NDI5NQ==","diff_hunk":"@@ -194,15 +193,16 @@ def enable_active_tpg(self, config):\n                 else:\n                     break\n \n-    def clear_config(self):\n+    def clear_config(self, target_disks):\n         \"\"\"\n         Remove the target definition form LIO\n         :return: None\n         \"\"\"\n         # check that there aren't any disks or clients in the configuration\n         lio_root = root.RTSRoot()\n \n-        disk_count = len([disk for disk in lio_root.storage_objects])\n+        disk_count = len([disk for disk in lio_root.storage_objects\n+                          if disk.name in target_disks])","path":"ceph_iscsi_config/gateway.py","position":25,"original_position":25,"commit_id":"9980ce39ffdac77cf13a6476fb9d890d7da69d25","original_commit_id":"9980ce39ffdac77cf13a6476fb9d890d7da69d25","user":{"login":"mikechristie","id":1063316,"node_id":"MDQ6VXNlcjEwNjMzMTY=","avatar_url":"https://avatars2.githubusercontent.com/u/1063316?v=4","gravatar_id":"","url":"https://api.github.com/users/mikechristie","html_url":"https://github.com/mikechristie","followers_url":"https://api.github.com/users/mikechristie/followers","following_url":"https://api.github.com/users/mikechristie/following{/other_user}","gists_url":"https://api.github.com/users/mikechristie/gists{/gist_id}","starred_url":"https://api.github.com/users/mikechristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikechristie/subscriptions","organizations_url":"https://api.github.com/users/mikechristie/orgs","repos_url":"https://api.github.com/users/mikechristie/repos","events_url":"https://api.github.com/users/mikechristie/events{/privacy}","received_events_url":"https://api.github.com/users/mikechristie/received_events","type":"User","site_admin":false},"body":"I think here too just loop over the disks specific to the target being cleared. I think you can just merge it into the tpg loop and check for luns under the tpg since that would detect if there are disks possibly being accessed through the target still.","created_at":"2018-12-20T06:10:56Z","updated_at":"2018-12-20T06:10:56Z","html_url":"https://github.com/ceph/ceph-iscsi/pull/9#discussion_r243164295","pull_request_url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/comments/243164295"},"html":{"href":"https://github.com/ceph/ceph-iscsi/pull/9#discussion_r243164295"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9","id":237350783,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MzUwNzgz","html_url":"https://github.com/ceph/ceph-iscsi/pull/9","diff_url":"https://github.com/ceph/ceph-iscsi/pull/9.diff","patch_url":"https://github.com/ceph/ceph-iscsi/pull/9.patch","issue_url":"https://api.github.com/repos/ceph/ceph-iscsi/issues/9","number":9,"state":"open","locked":false,"title":"Multiple iSCSI target support","user":{"login":"ricardoasmarques","id":14297426,"node_id":"MDQ6VXNlcjE0Mjk3NDI2","avatar_url":"https://avatars2.githubusercontent.com/u/14297426?v=4","gravatar_id":"","url":"https://api.github.com/users/ricardoasmarques","html_url":"https://github.com/ricardoasmarques","followers_url":"https://api.github.com/users/ricardoasmarques/followers","following_url":"https://api.github.com/users/ricardoasmarques/following{/other_user}","gists_url":"https://api.github.com/users/ricardoasmarques/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoasmarques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoasmarques/subscriptions","organizations_url":"https://api.github.com/users/ricardoasmarques/orgs","repos_url":"https://api.github.com/users/ricardoasmarques/repos","events_url":"https://api.github.com/users/ricardoasmarques/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoasmarques/received_events","type":"User","site_admin":false},"body":"This PR adds support for multiple iSCSI targets.\r\n\r\n![screenshot from 2018-12-10 14-48-50](https://user-images.githubusercontent.com/14297426/49739911-ee63bb80-fc8a-11e8-9a77-1ae43646a27d.png)\r\n\r\nThis PR includes commits from 2 other open PRs that should be merged beforehand - https://github.com/ceph/ceph-iscsi/pull/5 (or equivalente) and https://github.com/ceph/ceph-iscsi/pull/7.\r\n","created_at":"2018-12-10T15:00:22Z","updated_at":"2018-12-20T06:10:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"155f61bfadec0f444cdf3aede6593d56042ce867","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph-iscsi/issues/9/comments","statuses_url":"https://api.github.com/repos/ceph/ceph-iscsi/statuses/9980ce39ffdac77cf13a6476fb9d890d7da69d25","head":{"label":"ricardoasmarques:multi-target","ref":"multi-target","sha":"9980ce39ffdac77cf13a6476fb9d890d7da69d25","user":{"login":"ricardoasmarques","id":14297426,"node_id":"MDQ6VXNlcjE0Mjk3NDI2","avatar_url":"https://avatars2.githubusercontent.com/u/14297426?v=4","gravatar_id":"","url":"https://api.github.com/users/ricardoasmarques","html_url":"https://github.com/ricardoasmarques","followers_url":"https://api.github.com/users/ricardoasmarques/followers","following_url":"https://api.github.com/users/ricardoasmarques/following{/other_user}","gists_url":"https://api.github.com/users/ricardoasmarques/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoasmarques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoasmarques/subscriptions","organizations_url":"https://api.github.com/users/ricardoasmarques/orgs","repos_url":"https://api.github.com/users/ricardoasmarques/repos","events_url":"https://api.github.com/users/ricardoasmarques/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoasmarques/received_events","type":"User","site_admin":false},"repo":{"id":156615039,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY2MTUwMzk=","name":"ceph-iscsi","full_name":"ricardoasmarques/ceph-iscsi","private":false,"owner":{"login":"ricardoasmarques","id":14297426,"node_id":"MDQ6VXNlcjE0Mjk3NDI2","avatar_url":"https://avatars2.githubusercontent.com/u/14297426?v=4","gravatar_id":"","url":"https://api.github.com/users/ricardoasmarques","html_url":"https://github.com/ricardoasmarques","followers_url":"https://api.github.com/users/ricardoasmarques/followers","following_url":"https://api.github.com/users/ricardoasmarques/following{/other_user}","gists_url":"https://api.github.com/users/ricardoasmarques/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardoasmarques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardoasmarques/subscriptions","organizations_url":"https://api.github.com/users/ricardoasmarques/orgs","repos_url":"https://api.github.com/users/ricardoasmarques/repos","events_url":"https://api.github.com/users/ricardoasmarques/events{/privacy}","received_events_url":"https://api.github.com/users/ricardoasmarques/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ricardoasmarques/ceph-iscsi","description":"Ceph iSCSI tools","fork":true,"url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi","forks_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/forks","keys_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/teams","hooks_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/hooks","issue_events_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/issues/events{/number}","events_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/events","assignees_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/assignees{/user}","branches_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/branches{/branch}","tags_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/tags","blobs_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/statuses/{sha}","languages_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/languages","stargazers_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/stargazers","contributors_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/contributors","subscribers_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/subscribers","subscription_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/subscription","commits_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/contents/{+path}","compare_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/merges","archive_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/downloads","issues_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/issues{/number}","pulls_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/pulls{/number}","milestones_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/milestones{/number}","notifications_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/labels{/name}","releases_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/releases{/id}","deployments_url":"https://api.github.com/repos/ricardoasmarques/ceph-iscsi/deployments","created_at":"2018-11-07T22:11:44Z","updated_at":"2018-11-07T22:11:47Z","pushed_at":"2018-12-19T23:03:47Z","git_url":"git://github.com/ricardoasmarques/ceph-iscsi.git","ssh_url":"git@github.com:ricardoasmarques/ceph-iscsi.git","clone_url":"https://github.com/ricardoasmarques/ceph-iscsi.git","svn_url":"https://github.com/ricardoasmarques/ceph-iscsi","homepage":null,"size":2252,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"c65c84cc4624c85f79a305aa7f9682ea7b90d493","user":{"login":"ceph","id":1015767,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1015767?v=4","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":155882428,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU4ODI0Mjg=","name":"ceph-iscsi","full_name":"ceph/ceph-iscsi","private":false,"owner":{"login":"ceph","id":1015767,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwMTU3Njc=","avatar_url":"https://avatars3.githubusercontent.com/u/1015767?v=4","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ceph/ceph-iscsi","description":"Ceph iSCSI tools","fork":false,"url":"https://api.github.com/repos/ceph/ceph-iscsi","forks_url":"https://api.github.com/repos/ceph/ceph-iscsi/forks","keys_url":"https://api.github.com/repos/ceph/ceph-iscsi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph-iscsi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph-iscsi/teams","hooks_url":"https://api.github.com/repos/ceph/ceph-iscsi/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph-iscsi/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph-iscsi/events","assignees_url":"https://api.github.com/repos/ceph/ceph-iscsi/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph-iscsi/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph-iscsi/tags","blobs_url":"https://api.github.com/repos/ceph/ceph-iscsi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph-iscsi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph-iscsi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph-iscsi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph-iscsi/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph-iscsi/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph-iscsi/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph-iscsi/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph-iscsi/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph-iscsi/subscription","commits_url":"https://api.github.com/repos/ceph/ceph-iscsi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph-iscsi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph-iscsi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph-iscsi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph-iscsi/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph-iscsi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph-iscsi/merges","archive_url":"https://api.github.com/repos/ceph/ceph-iscsi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph-iscsi/downloads","issues_url":"https://api.github.com/repos/ceph/ceph-iscsi/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph-iscsi/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph-iscsi/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph-iscsi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph-iscsi/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph-iscsi/releases{/id}","deployments_url":"https://api.github.com/repos/ceph/ceph-iscsi/deployments","created_at":"2018-11-02T15:06:16Z","updated_at":"2018-12-13T20:42:55Z","pushed_at":"2018-12-19T23:03:49Z","git_url":"git://github.com/ceph/ceph-iscsi.git","ssh_url":"git@github.com:ceph/ceph-iscsi.git","clone_url":"https://github.com/ceph/ceph-iscsi.git","svn_url":"https://github.com/ceph/ceph-iscsi","homepage":null,"size":2174,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":6,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9"},"html":{"href":"https://github.com/ceph/ceph-iscsi/pull/9"},"issue":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/issues/9"},"comments":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph-iscsi/statuses/9980ce39ffdac77cf13a6476fb9d890d7da69d25"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mikechristie"}}