{"action":"opened","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/28766","labels_url":"https://api.github.com/repos/saltstack/salt/issues/28766/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/28766/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/28766/events","html_url":"https://github.com/saltstack/salt/issues/28766","id":116343419,"number":28766,"title":"salt-cloud ec2 image creates two keys and minion can't connect","user":{"login":"rusvdw","id":691768,"avatar_url":"https://avatars.githubusercontent.com/u/691768?v=3","gravatar_id":"","url":"https://api.github.com/users/rusvdw","html_url":"https://github.com/rusvdw","followers_url":"https://api.github.com/users/rusvdw/followers","following_url":"https://api.github.com/users/rusvdw/following{/other_user}","gists_url":"https://api.github.com/users/rusvdw/gists{/gist_id}","starred_url":"https://api.github.com/users/rusvdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rusvdw/subscriptions","organizations_url":"https://api.github.com/users/rusvdw/orgs","repos_url":"https://api.github.com/users/rusvdw/repos","events_url":"https://api.github.com/users/rusvdw/events{/privacy}","received_events_url":"https://api.github.com/users/rusvdw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-11T14:19:46Z","updated_at":"2015-11-11T14:19:46Z","closed_at":null,"body":"We've just started out with Salt and have hit a brick wall almost immediately trying to provision an Ubuntu image on ec2. The instance is created, but the minion is unable to connect due to a key issue. There are two keys created in salt-keys: the minion id supplied to salt-cloud and the ec2 hostname provided by AWS. \r\n\r\nMy cloud profile:\r\n\r\n```\r\nbase-ec2-testing:\r\n  provider: ec2-us-east\r\n  image: ami-d05e75b8\r\n  size: t2.small\r\n  ssh_username: ubuntu\r\n  network_interfaces:\r\n    - DeviceIndex: 0\r\n      PrivateIpAddresses:\r\n        - Primary: True\r\n      AssociatePublicIpAddress: False\r\n      SubnetId: subnet-xxxxxxx\r\n      SecurityGroupId:\r\n        - sg-xxxxxxxx\r\n  del_root_vol_on_destroy: True\r\n  del_all_vol_on_destroy: True\r\n  script: bootstrap-salt\r\n  script_args: -c /tmp/ -P -F -K -A 10.0.1.10\r\n```\r\n\r\nThe creation command:\r\n\r\n```\r\nsalt-cloud -p base-ec2-testing test.example.com\r\n```\r\n\r\nThe keys afterward:\r\n\r\n```\r\nroot@ops1:~# salt-key\r\nAccepted Keys:\r\ntest.example.com\r\nDenied Keys:\r\nUnaccepted Keys:\r\nip-10-0-1-187\r\nRejected Keys:\r\n```\r\n\r\nAnd the output from test.ping:\r\n\r\n```\r\nroot@ops1:~# salt '*' test.ping\r\ntest.example.com:\r\n    Minion did not return. [No response]\r\n```\r\n\r\nOn the minion:\r\n\r\n```\r\nroot@ip-10-0-1-187:~# tail /var/log/salt/minion \r\n2015-11-11 14:12:32,711 [salt.crypt       ][ERROR   ][9379] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate\r\n2015-11-11 14:12:42,726 [salt.crypt       ][ERROR   ][9379] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate\r\n...\r\n```\r\n\r\nVersions for the master:\r\n\r\n```\r\nroot@ops1:~# salt --versions\r\nSalt Version:\r\n           Salt: 2015.8.1\r\n \r\nDependency Versions:\r\n         Jinja2: 2.7.2\r\n       M2Crypto: Not Installed\r\n           Mako: 0.9.1\r\n         PyYAML: 3.10\r\n          PyZMQ: 14.4.0\r\n         Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n           RAET: Not Installed\r\n        Tornado: 4.2.1\r\n            ZMQ: 4.0.4\r\n           cffi: 1.3.0\r\n       cherrypy: Not Installed\r\n       dateutil: 1.5\r\n          gitdb: 0.5.4\r\n      gitpython: 0.3.2 RC1\r\n          ioflo: Not Installed\r\n        libnacl: Not Installed\r\n   msgpack-pure: Not Installed\r\n msgpack-python: 0.3.0\r\n   mysql-python: 1.2.3\r\n      pycparser: 2.14\r\n       pycrypto: 2.6.1\r\n         pygit2: 0.23.2\r\n   python-gnupg: Not Installed\r\n          smmap: 0.8.2\r\n        timelib: Not Installed\r\n \r\nSystem Versions:\r\n           dist: Ubuntu 14.04 trusty\r\n        machine: x86_64\r\n        release: 3.13.0-48-generic\r\n         system: Ubuntu 14.04 trusty\r\n```\r\n\r\nAnd for the minion:\r\n\r\n```\r\nroot@ip-10-0-1-187:~# salt-minion --versions\r\n                  Salt: 2015.5.3\r\n                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n                Jinja2: 2.7.2\r\n              M2Crypto: 0.21.1\r\n        msgpack-python: 0.3.0\r\n          msgpack-pure: Not Installed\r\n              pycrypto: 2.6.1\r\n               libnacl: Not Installed\r\n                PyYAML: 3.10\r\n                 ioflo: Not Installed\r\n                 PyZMQ: 14.0.1\r\n                  RAET: Not Installed\r\n                   ZMQ: 4.0.4\r\n                  Mako: Not Installed\r\n               Tornado: 4.3\r\n Debian source package: 2015.5.3+ds-1trusty1\r\n```"}}