{"action":"opened","number":28706,"pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/28706","id":137844212,"html_url":"https://github.com/ansible/ansible/pull/28706","diff_url":"https://github.com/ansible/ansible/pull/28706.diff","patch_url":"https://github.com/ansible/ansible/pull/28706.patch","issue_url":"https://api.github.com/repos/ansible/ansible/issues/28706","number":28706,"state":"open","locked":false,"title":"Stable vmWare VM disk creation (vsphere_guest only)","user":{"login":"noroutine","id":1372328,"avatar_url":"https://avatars3.githubusercontent.com/u/1372328?v=4","gravatar_id":"","url":"https://api.github.com/users/noroutine","html_url":"https://github.com/noroutine","followers_url":"https://api.github.com/users/noroutine/followers","following_url":"https://api.github.com/users/noroutine/following{/other_user}","gists_url":"https://api.github.com/users/noroutine/gists{/gist_id}","starred_url":"https://api.github.com/users/noroutine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noroutine/subscriptions","organizations_url":"https://api.github.com/users/noroutine/orgs","repos_url":"https://api.github.com/users/noroutine/repos","events_url":"https://api.github.com/users/noroutine/events{/privacy}","received_events_url":"https://api.github.com/users/noroutine/received_events","type":"User","site_admin":false},"body":"    * Create more than 15 disks during reconfigure and creation\r\n    * Allow to specify SCSI controller and unit\r\n    * Create needed SCSI controllers automatically\r\n    * Fix disk ordering\r\n\r\n##### SUMMARY\r\n<!--- Describe the change, including rationale and design decisions -->\r\nComprehensive fix for creating large arrays on vsphere. Unfortunately only for old module for now.\r\n\r\nBackground:\r\nFor large disk configurations in vm_disk field, the module failed to create disk arrays when vm was created from scratch or reconfigured, when more than 15 disks where requested. Additionally the disks where created in wrong order.\r\n\r\nWhile I saw several fixes merged already which try to fix the issue, none of them addressed two other, namely having predictable SCSI controller and lun setting and creating disks in predictable order\r\nThis pull request is supposed to fix all three issues, by introducing extra parameters: **controller** and **unit** in disk dict. This fix works for both creating from scratch or reconfiguring later\r\n\r\nThe fix falls back gracefully for simple setups, and allows to omit these parameters for first 15 disks, however user still can specify them and they will be honored. For disk1 till disk15, the controller is assumed to be 0 if missing and unit number is assumed to be disk id - 1 for disk1 to disk7 and disk id for disk8 to disk15\r\n\r\nLimitations:\r\nUnfortunately, as it appears vsphere doesn't allow to predictably name hard disks via API and enforces it's own numbering. This means the disk ids should appear in the dict without gaps. Means you can't create disk 15 without creating first 14 disks, otherwise numbers will not match anymore and subsequent task runs may fail or behave unpredictably.\r\n\r\nDisk numbering in vsphere begins with 1, so there should be no disk0 entry in the vm_disk. This might break for users who have it, since before vsphere created it as 'Hard disk 1', enforcing it. With this fix, disk id in vm_disk dict is used to actually match the disk in vm, so requirement for the number is much stricter.\r\n\r\nThis pull request relies on natsort module, not sure how badass it is from me to include this as dependency in requirements.txt, suggest your way if you don't like it\r\n\r\n<!---\r\nIf you are fixing an existing issue, please include \"Fixes #nnn\" in your\r\ncommit message and your description; but you should still explain what\r\nthe change does.\r\n-->\r\nFixes #19326 I suppose, however there were already several patches for that version merged anyway\r\n\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Bugfix Pull Request\r\n\r\n\r\n##### COMPONENT NAME\r\n<!--- Name of the module/plugin/module/task -->\r\nvsphere_guest\r\n\r\n##### ANSIBLE VERSION\r\n<!--- Paste verbatim output from “ansible --version” between quotes below -->\r\n```\r\nansible 2.4.0 (vsphere_guest_disk_fix d5c16767e6) last updated 2017/08/27 20:36:12 (GMT +200)\r\n  config file = /opt/data/devops/iac/env/dev01-dmz/ansible.cfg\r\n  configured module search path = [u'/home/tomcat/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /opt/data/external/ansible/ansible/lib/ansible\r\n  executable location = /opt/data/external/ansible/ansible/bin/ansible\r\n  python version = 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118]\r\n\r\n```\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n<!---\r\nInclude additional information to help people understand the change here.\r\nFor bugs that don't have a linked bug report, a step-by-step reproduction\r\nof the problem is helpful.\r\n  -->\r\nWay to reproduce the problem would involve playing with quite some playbooks and some screenshots, so instead of pasting tons of yaml, here are general guidance:\r\n\r\n- Create any vm with disk array that has more than 15 disks via playbook\r\nor\r\n- Create small vm and add disks during reconfiguring\r\n\r\nObserve the random disk numbers assigned to vm disks by vsphere\r\nObserve error when reconfiguring for more than 15 disks\r\n\r\n","created_at":"2017-08-27T19:04:03Z","updated_at":"2017-08-27T19:04:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ansible/ansible/pulls/28706/commits","review_comments_url":"https://api.github.com/repos/ansible/ansible/pulls/28706/comments","review_comment_url":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/28706/comments","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/e3a3467c5d89e16c09c7d0c08cad163a10033e4c","head":{"label":"noroutine:vsphere_guest_disk_fix","ref":"vsphere_guest_disk_fix","sha":"e3a3467c5d89e16c09c7d0c08cad163a10033e4c","user":{"login":"noroutine","id":1372328,"avatar_url":"https://avatars3.githubusercontent.com/u/1372328?v=4","gravatar_id":"","url":"https://api.github.com/users/noroutine","html_url":"https://github.com/noroutine","followers_url":"https://api.github.com/users/noroutine/followers","following_url":"https://api.github.com/users/noroutine/following{/other_user}","gists_url":"https://api.github.com/users/noroutine/gists{/gist_id}","starred_url":"https://api.github.com/users/noroutine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noroutine/subscriptions","organizations_url":"https://api.github.com/users/noroutine/orgs","repos_url":"https://api.github.com/users/noroutine/repos","events_url":"https://api.github.com/users/noroutine/events{/privacy}","received_events_url":"https://api.github.com/users/noroutine/received_events","type":"User","site_admin":false},"repo":{"id":99510341,"name":"ansible","full_name":"noroutine/ansible","owner":{"login":"noroutine","id":1372328,"avatar_url":"https://avatars3.githubusercontent.com/u/1372328?v=4","gravatar_id":"","url":"https://api.github.com/users/noroutine","html_url":"https://github.com/noroutine","followers_url":"https://api.github.com/users/noroutine/followers","following_url":"https://api.github.com/users/noroutine/following{/other_user}","gists_url":"https://api.github.com/users/noroutine/gists{/gist_id}","starred_url":"https://api.github.com/users/noroutine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noroutine/subscriptions","organizations_url":"https://api.github.com/users/noroutine/orgs","repos_url":"https://api.github.com/users/noroutine/repos","events_url":"https://api.github.com/users/noroutine/events{/privacy}","received_events_url":"https://api.github.com/users/noroutine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noroutine/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":true,"url":"https://api.github.com/repos/noroutine/ansible","forks_url":"https://api.github.com/repos/noroutine/ansible/forks","keys_url":"https://api.github.com/repos/noroutine/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noroutine/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noroutine/ansible/teams","hooks_url":"https://api.github.com/repos/noroutine/ansible/hooks","issue_events_url":"https://api.github.com/repos/noroutine/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/noroutine/ansible/events","assignees_url":"https://api.github.com/repos/noroutine/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/noroutine/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/noroutine/ansible/tags","blobs_url":"https://api.github.com/repos/noroutine/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noroutine/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noroutine/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/noroutine/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noroutine/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/noroutine/ansible/languages","stargazers_url":"https://api.github.com/repos/noroutine/ansible/stargazers","contributors_url":"https://api.github.com/repos/noroutine/ansible/contributors","subscribers_url":"https://api.github.com/repos/noroutine/ansible/subscribers","subscription_url":"https://api.github.com/repos/noroutine/ansible/subscription","commits_url":"https://api.github.com/repos/noroutine/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/noroutine/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/noroutine/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/noroutine/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/noroutine/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/noroutine/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noroutine/ansible/merges","archive_url":"https://api.github.com/repos/noroutine/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noroutine/ansible/downloads","issues_url":"https://api.github.com/repos/noroutine/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/noroutine/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/noroutine/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/noroutine/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noroutine/ansible/labels{/name}","releases_url":"https://api.github.com/repos/noroutine/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/noroutine/ansible/deployments","created_at":"2017-08-06T20:01:55Z","updated_at":"2017-08-06T20:02:20Z","pushed_at":"2017-08-27T19:02:08Z","git_url":"git://github.com/noroutine/ansible.git","ssh_url":"git@github.com:noroutine/ansible.git","clone_url":"https://github.com/noroutine/ansible.git","svn_url":"https://github.com/noroutine/ansible","homepage":"http://ansible.com/","size":82167,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"ansible:devel","ref":"devel","sha":"791a0292034028015e5a85fc050c392bf3a6677c","user":{"login":"ansible","id":1507452,"avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"repo":{"id":3638964,"name":"ansible","full_name":"ansible/ansible","owner":{"login":"ansible","id":1507452,"avatar_url":"https://avatars2.githubusercontent.com/u/1507452?v=4","gravatar_id":"","url":"https://api.github.com/users/ansible","html_url":"https://github.com/ansible","followers_url":"https://api.github.com/users/ansible/followers","following_url":"https://api.github.com/users/ansible/following{/other_user}","gists_url":"https://api.github.com/users/ansible/gists{/gist_id}","starred_url":"https://api.github.com/users/ansible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ansible/subscriptions","organizations_url":"https://api.github.com/users/ansible/orgs","repos_url":"https://api.github.com/users/ansible/repos","events_url":"https://api.github.com/users/ansible/events{/privacy}","received_events_url":"https://api.github.com/users/ansible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ansible/ansible","description":"Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. Avoid writing scripts or custom code to deploy and update your applications— automate in a language that approaches plain English, using SSH, with no agents to install on remote systems.","fork":false,"url":"https://api.github.com/repos/ansible/ansible","forks_url":"https://api.github.com/repos/ansible/ansible/forks","keys_url":"https://api.github.com/repos/ansible/ansible/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ansible/ansible/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ansible/ansible/teams","hooks_url":"https://api.github.com/repos/ansible/ansible/hooks","issue_events_url":"https://api.github.com/repos/ansible/ansible/issues/events{/number}","events_url":"https://api.github.com/repos/ansible/ansible/events","assignees_url":"https://api.github.com/repos/ansible/ansible/assignees{/user}","branches_url":"https://api.github.com/repos/ansible/ansible/branches{/branch}","tags_url":"https://api.github.com/repos/ansible/ansible/tags","blobs_url":"https://api.github.com/repos/ansible/ansible/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ansible/ansible/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ansible/ansible/git/refs{/sha}","trees_url":"https://api.github.com/repos/ansible/ansible/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ansible/ansible/statuses/{sha}","languages_url":"https://api.github.com/repos/ansible/ansible/languages","stargazers_url":"https://api.github.com/repos/ansible/ansible/stargazers","contributors_url":"https://api.github.com/repos/ansible/ansible/contributors","subscribers_url":"https://api.github.com/repos/ansible/ansible/subscribers","subscription_url":"https://api.github.com/repos/ansible/ansible/subscription","commits_url":"https://api.github.com/repos/ansible/ansible/commits{/sha}","git_commits_url":"https://api.github.com/repos/ansible/ansible/git/commits{/sha}","comments_url":"https://api.github.com/repos/ansible/ansible/comments{/number}","issue_comment_url":"https://api.github.com/repos/ansible/ansible/issues/comments{/number}","contents_url":"https://api.github.com/repos/ansible/ansible/contents/{+path}","compare_url":"https://api.github.com/repos/ansible/ansible/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ansible/ansible/merges","archive_url":"https://api.github.com/repos/ansible/ansible/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ansible/ansible/downloads","issues_url":"https://api.github.com/repos/ansible/ansible/issues{/number}","pulls_url":"https://api.github.com/repos/ansible/ansible/pulls{/number}","milestones_url":"https://api.github.com/repos/ansible/ansible/milestones{/number}","notifications_url":"https://api.github.com/repos/ansible/ansible/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ansible/ansible/labels{/name}","releases_url":"https://api.github.com/repos/ansible/ansible/releases{/id}","deployments_url":"https://api.github.com/repos/ansible/ansible/deployments","created_at":"2012-03-06T14:58:02Z","updated_at":"2017-08-27T17:52:10Z","pushed_at":"2017-08-27T16:15:43Z","git_url":"git://github.com/ansible/ansible.git","ssh_url":"git@github.com:ansible/ansible.git","clone_url":"https://github.com/ansible/ansible.git","svn_url":"https://github.com/ansible/ansible","homepage":"http://ansible.com/","size":90154,"stargazers_count":25028,"watchers_count":25028,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8688,"mirror_url":null,"open_issues_count":3434,"forks":8688,"open_issues":3434,"watchers":25028,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28706"},"html":{"href":"https://github.com/ansible/ansible/pull/28706"},"issue":{"href":"https://api.github.com/repos/ansible/ansible/issues/28706"},"comments":{"href":"https://api.github.com/repos/ansible/ansible/issues/28706/comments"},"review_comments":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28706/comments"},"review_comment":{"href":"https://api.github.com/repos/ansible/ansible/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ansible/ansible/pulls/28706/commits"},"statuses":{"href":"https://api.github.com/repos/ansible/ansible/statuses/e3a3467c5d89e16c09c7d0c08cad163a10033e4c"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":185,"deletions":56,"changed_files":2}}
{"actor":{"display_login":"noroutine"}}