{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/22550","labels_url":"https://api.github.com/repos/saltstack/salt/issues/22550/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/22550/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/22550/events","html_url":"https://github.com/saltstack/salt/issues/22550","id":67806139,"number":22550,"title":"Error deleting SSH keys using salt-cloud --destroy","user":{"login":"amendlik","id":6018668,"avatar_url":"https://avatars.githubusercontent.com/u/6018668?v=3","gravatar_id":"","url":"https://api.github.com/users/amendlik","html_url":"https://github.com/amendlik","followers_url":"https://api.github.com/users/amendlik/followers","following_url":"https://api.github.com/users/amendlik/following{/other_user}","gists_url":"https://api.github.com/users/amendlik/gists{/gist_id}","starred_url":"https://api.github.com/users/amendlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amendlik/subscriptions","organizations_url":"https://api.github.com/users/amendlik/orgs","repos_url":"https://api.github.com/users/amendlik/repos","events_url":"https://api.github.com/users/amendlik/events{/privacy}","received_events_url":"https://api.github.com/users/amendlik/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143"},{"url":"https://api.github.com/repos/saltstack/salt/labels/P3","name":"P3","color":"0a3d77"},{"url":"https://api.github.com/repos/saltstack/salt/labels/RIoT","name":"RIoT","color":"fef2c0"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-Cloud","name":"Salt-Cloud","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","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://avatars.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":2484,"closed_issues":2500,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2015-08-21T21:33:09Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-04-11T16:45:32Z","updated_at":"2015-08-21T21:52:59Z","closed_at":null,"body":"Error deleting SSH keys when ```delete_sshkeys: True``` and ```ssh_interface: private_ips```\r\n```python\r\n[ERROR   ] There was an error destroying machines: list index out of range\r\nTraceback (most recent call last):\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cloud/cli.py\", line 166, in run\r\n    ret = mapper.destroy(names, cached=True)\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cloud/__init__.py\", line 958, in destroy\r\n    ret = self.clouds[fun](name)\r\n  File \"/usr/lib/python2.7/dist-packages/salt/cloud/libcloudfuncs.py\", line 379, in destroy\r\n    salt.utils.cloud.remove_sshkey(getattr(node, __opts__.get('ssh_interface', 'public_ips'))[0])\r\nIndexError: list index out of range\r\n```\r\n\r\nMy environment is an OpenStack private cloud, with salt-cloud running outside the cloud. Salt considers both the private address and the floating address to be 'private' addresses:\r\n```yaml\r\n            id:\r\n                33ded115-98b3-4aa4-aa91-7b46baadcb91\r\n            image:\r\n                None\r\n            private_ips:\r\n                - 10.0.0.15         <--- Private address\r\n                - 192.168.1.85      <--- Floating address (Salt must use this one)\r\n            public_ips:\r\n            size:\r\n                None\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/133574191","html_url":"https://github.com/saltstack/salt/issues/22550#issuecomment-133574191","issue_url":"https://api.github.com/repos/saltstack/salt/issues/22550","id":133574191,"user":{"login":"rallytime","id":6547906,"avatar_url":"https://avatars.githubusercontent.com/u/6547906?v=3","gravatar_id":"","url":"https://api.github.com/users/rallytime","html_url":"https://github.com/rallytime","followers_url":"https://api.github.com/users/rallytime/followers","following_url":"https://api.github.com/users/rallytime/following{/other_user}","gists_url":"https://api.github.com/users/rallytime/gists{/gist_id}","starred_url":"https://api.github.com/users/rallytime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rallytime/subscriptions","organizations_url":"https://api.github.com/users/rallytime/orgs","repos_url":"https://api.github.com/users/rallytime/repos","events_url":"https://api.github.com/users/rallytime/events{/privacy}","received_events_url":"https://api.github.com/users/rallytime/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T21:52:59Z","updated_at":"2015-08-21T21:52:59Z","body":"@amendlik Thanks for testing that and confirming. I have submitted #26573 to fix this issue. Can you give it a try and confirm that is fixes this bug for you?"}}