Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry getting private key without the driver config if its not originally found #503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bbbco
Copy link
Contributor

@bbbco bbbco commented Feb 11, 2016

I was trying to initialize a fog driver, when I kept running into this issue:

    RuntimeError
    ------------
    Server has key name 'openstack', but the corresponding private key was not found locally.  
    Check if the key is in Chef::Config.private_key_paths: /home/bbbco/.chef/keys, /home/bbbco/.ssh

Much to my frustration, the key it was looking for were in both of those locations. I traced the issue back to this method, which passes the driver config into the Cheffish module method. If the config doesn't have :private_key_paths set, then it just returns nil, and ultimately the driver fails back up the stack.

This fix tries to get the private key using the driver config first, and if nothing returned, will try again without the driver config (and Cheffish will just default to pulling its own node's config in).

@bbbco
Copy link
Contributor Author

bbbco commented Mar 8, 2017

Can we get this fix pulled in?

@tas50 tas50 removed the Signed CLA label Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants