saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.17k stars 5.48k forks source link

Salt-cloud does not check for duplicate ssh keys when using provider such as DigitalOcean #25079

Closed jondonas closed 9 years ago

jondonas commented 9 years ago

When making a new minion with salt-cloud, if you have more than one ssh key with the same name with a provider (such as digital ocean) there is no warning issued. This can lead to 'Permission Denied" issues when trying to deploy a minion. Would be useful for salt to check for duplicate names and show a warning.

UtahDave commented 9 years ago

Thanks for the report!

Can you provide the output of salt-cloud --versions-report on your master?

Do you mean that there are multiple keys with the same name created in the DigitialOcean interface itself or on the Salt Master?

Also, can you provide the exact command you ran as well as all the output you received?

Thanks!

UtahDave commented 9 years ago

I've confirmed that DigitalOcean's web gui allows for creating multiple keys with the same name, although their fingerprints are unique.

jondonas commented 9 years ago

Thanks for your response.

Salt: 2015.5.0
                Python: 2.7.6 (default, Jun 22 2015, 17:58:13)
                Jinja2: 2.7.2
              M2Crypto: 0.21.1
        msgpack-python: 0.3.0
          msgpack-pure: Not Installed
              pycrypto: 2.6.1
               libnacl: Not Installed
                PyYAML: 3.10
                 ioflo: Not Installed
                 PyZMQ: 14.0.1
                  RAET: Not Installed
                   ZMQ: 4.0.4
                  Mako: 0.9.1
       Apache Libcloud: 0.17.0
 Debian source package: 2015.5.0+ds-1trusty1

This is related to multiple keys with the same name on the DigitalOcean interface. It would be useful for salt-cloud to check for this situation as it could potentially save some troubleshooting time!

It occurred when running salt-cloud -p ubuntu_512MB_ny3 minionname Output included multiple lines of Permission denied (publickey,password) followed by Failed to start salt.

Thanks again for your help!

rallytime commented 9 years ago

@jondonas I have fixed this in #27245. Thanks for catching this!