{"action":"opened","number":3644,"pull_request":{"url":"https://api.github.com/repos/Azure/acs-engine/pulls/3644","id":207219076,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MjE5MDc2","html_url":"https://github.com/Azure/acs-engine/pull/3644","diff_url":"https://github.com/Azure/acs-engine/pull/3644.diff","patch_url":"https://github.com/Azure/acs-engine/pull/3644.patch","issue_url":"https://api.github.com/repos/Azure/acs-engine/issues/3644","number":3644,"state":"open","locked":false,"title":"Vm index","user":{"login":"shanalily","id":17444763,"node_id":"MDQ6VXNlcjE3NDQ0NzYz","avatar_url":"https://avatars3.githubusercontent.com/u/17444763?v=4","gravatar_id":"","url":"https://api.github.com/users/shanalily","html_url":"https://github.com/shanalily","followers_url":"https://api.github.com/users/shanalily/followers","following_url":"https://api.github.com/users/shanalily/following{/other_user}","gists_url":"https://api.github.com/users/shanalily/gists{/gist_id}","starred_url":"https://api.github.com/users/shanalily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanalily/subscriptions","organizations_url":"https://api.github.com/users/shanalily/orgs","repos_url":"https://api.github.com/users/shanalily/repos","events_url":"https://api.github.com/users/shanalily/events{/privacy}","received_events_url":"https://api.github.com/users/shanalily/received_events","type":"User","site_admin":false},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If you want *faster* PR reviews, read how: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#best-practices-for-faster-reviews\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\nWhen upgrading a cluster, there can be gaps in the index in the VM names (e.g. there are 3 VMs with names k8s-agentpool1-00000000-0, k8s-agentpool1-00000000-1, k8s-agentpool1-00000000-3 but none ending in 2). This is a problem when scaling down a cluster with the `acs-engine scale` command because the index in the name is used for iterating over the VMs so there might be an attempt to drain a node with no name and the scale operation will fail. The index isn't needed for iterating over the VMs so they can be stored in a slice instead.\r\n\r\n**Which issue this PR fixes**: fixes #2362\r\n\r\n**Special notes for your reviewer**:\r\nI want to know that I'm not breaking anything, though I've been using this change for a while without problems. This seems like a simple fix so I feel like I'm missing something.\r\n\r\n**If applicable**:\r\n- [ ] documentation\r\n- [x] unit tests\r\n- [ ] tested backward compatibility (ie. deploy with previous version, upgrade with this branch)\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```","created_at":"2018-08-09T07:03:18Z","updated_at":"2018-08-09T07:03:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[{"login":"CecileRobertMichon","id":8650424,"node_id":"MDQ6VXNlcjg2NTA0MjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/8650424?v=4","gravatar_id":"","url":"https://api.github.com/users/CecileRobertMichon","html_url":"https://github.com/CecileRobertMichon","followers_url":"https://api.github.com/users/CecileRobertMichon/followers","following_url":"https://api.github.com/users/CecileRobertMichon/following{/other_user}","gists_url":"https://api.github.com/users/CecileRobertMichon/gists{/gist_id}","starred_url":"https://api.github.com/users/CecileRobertMichon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CecileRobertMichon/subscriptions","organizations_url":"https://api.github.com/users/CecileRobertMichon/orgs","repos_url":"https://api.github.com/users/CecileRobertMichon/repos","events_url":"https://api.github.com/users/CecileRobertMichon/events{/privacy}","received_events_url":"https://api.github.com/users/CecileRobertMichon/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/acs-engine/pulls/3644/commits","review_comments_url":"https://api.github.com/repos/Azure/acs-engine/pulls/3644/comments","review_comment_url":"https://api.github.com/repos/Azure/acs-engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/acs-engine/issues/3644/comments","statuses_url":"https://api.github.com/repos/Azure/acs-engine/statuses/19615b06c14ceee72b5e755d622340bdafee655d","head":{"label":"shanalily:vm-index","ref":"vm-index","sha":"19615b06c14ceee72b5e755d622340bdafee655d","user":{"login":"shanalily","id":17444763,"node_id":"MDQ6VXNlcjE3NDQ0NzYz","avatar_url":"https://avatars3.githubusercontent.com/u/17444763?v=4","gravatar_id":"","url":"https://api.github.com/users/shanalily","html_url":"https://github.com/shanalily","followers_url":"https://api.github.com/users/shanalily/followers","following_url":"https://api.github.com/users/shanalily/following{/other_user}","gists_url":"https://api.github.com/users/shanalily/gists{/gist_id}","starred_url":"https://api.github.com/users/shanalily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanalily/subscriptions","organizations_url":"https://api.github.com/users/shanalily/orgs","repos_url":"https://api.github.com/users/shanalily/repos","events_url":"https://api.github.com/users/shanalily/events{/privacy}","received_events_url":"https://api.github.com/users/shanalily/received_events","type":"User","site_admin":false},"repo":{"id":141192836,"node_id":"MDEwOlJlcG9zaXRvcnkxNDExOTI4MzY=","name":"acs-engine","full_name":"shanalily/acs-engine","owner":{"login":"shanalily","id":17444763,"node_id":"MDQ6VXNlcjE3NDQ0NzYz","avatar_url":"https://avatars3.githubusercontent.com/u/17444763?v=4","gravatar_id":"","url":"https://api.github.com/users/shanalily","html_url":"https://github.com/shanalily","followers_url":"https://api.github.com/users/shanalily/followers","following_url":"https://api.github.com/users/shanalily/following{/other_user}","gists_url":"https://api.github.com/users/shanalily/gists{/gist_id}","starred_url":"https://api.github.com/users/shanalily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shanalily/subscriptions","organizations_url":"https://api.github.com/users/shanalily/orgs","repos_url":"https://api.github.com/users/shanalily/repos","events_url":"https://api.github.com/users/shanalily/events{/privacy}","received_events_url":"https://api.github.com/users/shanalily/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shanalily/acs-engine","description":"Azure Container Service Engine - provision and deploy container orchestrators on Azure: Kubernetes, DC/OS, and Docker Swarm.","fork":true,"url":"https://api.github.com/repos/shanalily/acs-engine","forks_url":"https://api.github.com/repos/shanalily/acs-engine/forks","keys_url":"https://api.github.com/repos/shanalily/acs-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shanalily/acs-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shanalily/acs-engine/teams","hooks_url":"https://api.github.com/repos/shanalily/acs-engine/hooks","issue_events_url":"https://api.github.com/repos/shanalily/acs-engine/issues/events{/number}","events_url":"https://api.github.com/repos/shanalily/acs-engine/events","assignees_url":"https://api.github.com/repos/shanalily/acs-engine/assignees{/user}","branches_url":"https://api.github.com/repos/shanalily/acs-engine/branches{/branch}","tags_url":"https://api.github.com/repos/shanalily/acs-engine/tags","blobs_url":"https://api.github.com/repos/shanalily/acs-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shanalily/acs-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shanalily/acs-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/shanalily/acs-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shanalily/acs-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/shanalily/acs-engine/languages","stargazers_url":"https://api.github.com/repos/shanalily/acs-engine/stargazers","contributors_url":"https://api.github.com/repos/shanalily/acs-engine/contributors","subscribers_url":"https://api.github.com/repos/shanalily/acs-engine/subscribers","subscription_url":"https://api.github.com/repos/shanalily/acs-engine/subscription","commits_url":"https://api.github.com/repos/shanalily/acs-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/shanalily/acs-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/shanalily/acs-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/shanalily/acs-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/shanalily/acs-engine/contents/{+path}","compare_url":"https://api.github.com/repos/shanalily/acs-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shanalily/acs-engine/merges","archive_url":"https://api.github.com/repos/shanalily/acs-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shanalily/acs-engine/downloads","issues_url":"https://api.github.com/repos/shanalily/acs-engine/issues{/number}","pulls_url":"https://api.github.com/repos/shanalily/acs-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/shanalily/acs-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/shanalily/acs-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shanalily/acs-engine/labels{/name}","releases_url":"https://api.github.com/repos/shanalily/acs-engine/releases{/id}","deployments_url":"https://api.github.com/repos/shanalily/acs-engine/deployments","created_at":"2018-07-16T20:48:54Z","updated_at":"2018-07-16T20:48:59Z","pushed_at":"2018-08-09T07:01:02Z","git_url":"git://github.com/shanalily/acs-engine.git","ssh_url":"git@github.com:shanalily/acs-engine.git","clone_url":"https://github.com/shanalily/acs-engine.git","svn_url":"https://github.com/shanalily/acs-engine","homepage":"","size":77976,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"ccb5dc0cb3189100a0478798fe5e8da506262f78","user":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":66011370,"node_id":"MDEwOlJlcG9zaXRvcnk2NjAxMTM3MA==","name":"acs-engine","full_name":"Azure/acs-engine","owner":{"login":"Azure","id":6844498,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4NDQ0OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/6844498?v=4","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/acs-engine","description":"Azure Container Service Engine - provision and deploy container orchestrators on Azure: Kubernetes, DC/OS, and Docker Swarm.","fork":false,"url":"https://api.github.com/repos/Azure/acs-engine","forks_url":"https://api.github.com/repos/Azure/acs-engine/forks","keys_url":"https://api.github.com/repos/Azure/acs-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/acs-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/acs-engine/teams","hooks_url":"https://api.github.com/repos/Azure/acs-engine/hooks","issue_events_url":"https://api.github.com/repos/Azure/acs-engine/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/acs-engine/events","assignees_url":"https://api.github.com/repos/Azure/acs-engine/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/acs-engine/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/acs-engine/tags","blobs_url":"https://api.github.com/repos/Azure/acs-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/acs-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/acs-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/acs-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/acs-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/acs-engine/languages","stargazers_url":"https://api.github.com/repos/Azure/acs-engine/stargazers","contributors_url":"https://api.github.com/repos/Azure/acs-engine/contributors","subscribers_url":"https://api.github.com/repos/Azure/acs-engine/subscribers","subscription_url":"https://api.github.com/repos/Azure/acs-engine/subscription","commits_url":"https://api.github.com/repos/Azure/acs-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/acs-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/acs-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/acs-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/acs-engine/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/acs-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/acs-engine/merges","archive_url":"https://api.github.com/repos/Azure/acs-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/acs-engine/downloads","issues_url":"https://api.github.com/repos/Azure/acs-engine/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/acs-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/acs-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/acs-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/acs-engine/labels{/name}","releases_url":"https://api.github.com/repos/Azure/acs-engine/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/acs-engine/deployments","created_at":"2016-08-18T16:05:16Z","updated_at":"2018-08-09T00:23:04Z","pushed_at":"2018-08-09T02:33:07Z","git_url":"git://github.com/Azure/acs-engine.git","ssh_url":"git@github.com:Azure/acs-engine.git","clone_url":"https://github.com/Azure/acs-engine.git","svn_url":"https://github.com/Azure/acs-engine","homepage":"","size":88242,"stargazers_count":902,"watchers_count":902,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":563,"mirror_url":null,"archived":false,"open_issues_count":569,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":563,"open_issues":569,"watchers":902,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/acs-engine/pulls/3644"},"html":{"href":"https://github.com/Azure/acs-engine/pull/3644"},"issue":{"href":"https://api.github.com/repos/Azure/acs-engine/issues/3644"},"comments":{"href":"https://api.github.com/repos/Azure/acs-engine/issues/3644/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/acs-engine/pulls/3644/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/acs-engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/acs-engine/pulls/3644/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/acs-engine/statuses/19615b06c14ceee72b5e755d622340bdafee655d"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":4,"additions":11,"deletions":10,"changed_files":1}}
{"actor":{"display_login":"shanalily"}}