{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33206","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33206/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33206/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33206/events","html_url":"https://github.com/kubernetes/kubernetes/pull/33206","id":178454550,"number":33206,"title":"Fixed a bug that causes k8s to delete all healthmonitors on your OpenStack tenant","user":{"login":"hacktastic","id":6051613,"avatar_url":"https://avatars.githubusercontent.com/u/6051613?v=3","gravatar_id":"","url":"https://api.github.com/users/hacktastic","html_url":"https://github.com/hacktastic","followers_url":"https://api.github.com/users/hacktastic/followers","following_url":"https://api.github.com/users/hacktastic/following{/other_user}","gists_url":"https://api.github.com/users/hacktastic/gists{/gist_id}","starred_url":"https://api.github.com/users/hacktastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hacktastic/subscriptions","organizations_url":"https://api.github.com/users/hacktastic/orgs","repos_url":"https://api.github.com/users/hacktastic/repos","events_url":"https://api.github.com/users/hacktastic/events{/privacy}","received_events_url":"https://api.github.com/users/hacktastic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20no","name":"cla: no","color":"e11d21"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-label-needed","name":"release-note-label-needed","color":"db5a64"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/S","name":"size/S","color":"77bb00"}],"state":"open","locked":false,"assignee":{"login":"anguslees","id":224224,"avatar_url":"https://avatars.githubusercontent.com/u/224224?v=3","gravatar_id":"","url":"https://api.github.com/users/anguslees","html_url":"https://github.com/anguslees","followers_url":"https://api.github.com/users/anguslees/followers","following_url":"https://api.github.com/users/anguslees/following{/other_user}","gists_url":"https://api.github.com/users/anguslees/gists{/gist_id}","starred_url":"https://api.github.com/users/anguslees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anguslees/subscriptions","organizations_url":"https://api.github.com/users/anguslees/orgs","repos_url":"https://api.github.com/users/anguslees/repos","events_url":"https://api.github.com/users/anguslees/events{/privacy}","received_events_url":"https://api.github.com/users/anguslees/received_events","type":"User","site_admin":false},"assignees":[{"login":"anguslees","id":224224,"avatar_url":"https://avatars.githubusercontent.com/u/224224?v=3","gravatar_id":"","url":"https://api.github.com/users/anguslees","html_url":"https://github.com/anguslees","followers_url":"https://api.github.com/users/anguslees/followers","following_url":"https://api.github.com/users/anguslees/following{/other_user}","gists_url":"https://api.github.com/users/anguslees/gists{/gist_id}","starred_url":"https://api.github.com/users/anguslees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anguslees/subscriptions","organizations_url":"https://api.github.com/users/anguslees/orgs","repos_url":"https://api.github.com/users/anguslees/repos","events_url":"https://api.github.com/users/anguslees/events{/privacy}","received_events_url":"https://api.github.com/users/anguslees/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-09-21T20:30:27Z","updated_at":"2016-09-21T20:40:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33206","html_url":"https://github.com/kubernetes/kubernetes/pull/33206","diff_url":"https://github.com/kubernetes/kubernetes/pull/33206.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/33206.patch"},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md\r\n2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md\r\n3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\nThe OpenStack LBaaS v2 api does not support filtering health monitors by pool_id, so /lbaas/healthmonitors?pool_id=abc123 will always return all health monitors in your OpenStack tenant. \r\n\r\nThis presents a problem when, in the very next block of code, we loop over the list of monitorIDs and delete them one-by-one. This will delete all the health monitors in your tenant without warning. \r\n\r\nFortunately, we already got the healthmonitor IDs when we built the list of pools. Using those, we can delete only those healthmonitors associated with our pool(s).\r\n\r\n**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #\r\n\r\n**Special notes for your reviewer**:\r\nThe main issue here was the use of v2_monitors.List(lbaas.network, v2_monitors.ListOpts{PoolID: poolID}). This is trying to filter healthmonitors by pool_id, but that is not supported by the API. It creates a call like /lbaas/healthmonitors?pool_id=abc123. The API server ignores the pool_id parameter and returns a list of all healthmonitors (which k8s then tries to delete).\r\n\r\n**Release note**:\r\n<!--  Steps to write your release note:\r\n1. Use the release-note-* labels to set the release note state (if you have access) \r\n2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. \r\n-->\r\n```release-note\r\n```\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/33206)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/248736088","html_url":"https://github.com/kubernetes/kubernetes/pull/33206#issuecomment-248736088","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33206","id":248736088,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T20:40:13Z","updated_at":"2016-09-21T20:40:13Z","body":"Labelling this PR as size/S"}}
{"actor":{"display_login":"k8s-merge-robot"}}