{"action":"closed","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/40439","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/40439/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/40439/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/40439/events","html_url":"https://github.com/saltstack/salt/issues/40439","id":218338407,"number":40439,"title":"KeyError on vmware salt-cloud when using --no-deploy argument","user":{"login":"Ch3LL","id":6886822,"avatar_url":"https://avatars0.githubusercontent.com/u/6886822?v=3","gravatar_id":"","url":"https://api.github.com/users/Ch3LL","html_url":"https://github.com/Ch3LL","followers_url":"https://api.github.com/users/Ch3LL/followers","following_url":"https://api.github.com/users/Ch3LL/following{/other_user}","gists_url":"https://api.github.com/users/Ch3LL/gists{/gist_id}","starred_url":"https://api.github.com/users/Ch3LL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ch3LL/subscriptions","organizations_url":"https://api.github.com/users/Ch3LL/orgs","repos_url":"https://api.github.com/users/Ch3LL/repos","events_url":"https://api.github.com/users/Ch3LL/events{/privacy}","received_events_url":"https://api.github.com/users/Ch3LL/received_events","type":"User","site_admin":false},"labels":[{"id":41387723,"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":41387994,"url":"https://api.github.com/repos/saltstack/salt/labels/Medium%20Severity","name":"Medium Severity","color":"fad8c7","default":false},{"id":194766324,"url":"https://api.github.com/repos/saltstack/salt/labels/P4","name":"P4","color":"031a39","default":false},{"id":77737132,"url":"https://api.github.com/repos/saltstack/salt/labels/Pending%20Discussion","name":"Pending Discussion","color":"c7def8","default":false},{"id":220527153,"url":"https://api.github.com/repos/saltstack/salt/labels/RIoT","name":"RIoT","color":"fef2c0","default":false},{"id":65370277,"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-Cloud","name":"Salt-Cloud","color":"006b75","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestone/13","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars3.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":3535,"closed_issues":4487,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2017-04-27T21:21:30Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2017-03-30T21:50:30Z","updated_at":"2017-04-27T21:21:30Z","closed_at":"2017-04-27T21:21:30Z","body":"### Description of Issue/Question\r\nWhen attempting to create a VM using the VMWare driver with the --no-deploy argument I am seeing this error on develop:\r\n\r\n```\r\n[ERROR   ] Failed to create VM CLOUD-TEST-RNDTWU. Configuration value 'deploy_kwargs' needs to be set\r\nTraceback (most recent call last):\r\n  File \"/home/ch3ll/git/salt/salt/cloud/__init__.py\", line 1274, in create\r\n    output = self.clouds[func](vm_)\r\n  File \"/home/ch3ll/git/salt/salt/cloud/clouds/vmware.py\", line 2725, in create\r\n    data['deploy_kwargs'] = out['deploy_kwargs']\r\nKeyError: 'deploy_kwargs'\r\n```\r\n\r\nThis is because when running with `--no-deploy` argument, in the code [here](https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/vmware.py#L2360) deploy ends up becoming True even though I set it as an argument to be False. The reason is because the call to get_cloud_config_value has `search_global` set to False so it won't end up searching in opts\r\n\r\nNow that deploy is set to True even though it should be false it then gets to [here](https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/vmware.py#L2713) because deploy is now true and out ends up equaling: `{'Error': {'No Deploy': \"'deploy' is not enabled. Not deploying.\"}}`\r\n\r\nThis then causes the key error further down [here](https://github.com/saltstack/salt/blob/develop/salt/cloud/clouds/vmware.py#L2718) because out does not have `deploy_kwargs`.\r\n\r\nLooks like setting deploy in the vmware config was added here 9d57bfc9\r\nping @nmadhok is there a reason you want to specify `search_global` to be False?\r\n\r\n### Steps to Reproduce Issue\r\n`salt-cloud -p <vmware-profile> <vmware-vmname> --no-deploy -ldebug`\r\n\r\n### Versions Report\r\n`salt 2016.11.0-1072-gaa95b99 (Carbon)`\r\n"}}
{"actor":{"display_login":"Ch3LL"}}