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

Already on GitHub? Sign in to your account

ssh config file doesn't work with recipe:, deploy_chef, etc... #146

Closed
michaelballantyne opened this Issue Jan 26, 2013 · 4 comments

Comments

Projects
None yet
2 participants
Contributor

michaelballantyne commented Jan 26, 2013

I use an ssh config file with a short "Host" attribute like "sls", and specify the dns in "HostName".

The current version of littlechef works fine for a standard node sync with:
fix node:sls

But doesn't find my private key when I do something like:
fix node:sls deploy_chef
or
fix node:sls recipe:apache2

With some debugging it seems like the cause of this is that the node() function sets env.host and env.host_string to the short name "sls" before calling chef.sync_node(node).

In recipe(), however, the debugger shows that env.host and env.host_string are set to the DNS name of the server (something like sls.my-domain.com) rather than the short name "sls". I suspect that means that code later down the line doesn't find the identityfile associated with the host "sls" in the ssh_config.

Version info:
Fabric==1.5.2
paramiko==1.9.0

littlechef==1.4.1 (installed from a checkout of trunk, made today, including fix you made for issue #139)

Owner

tobami commented Jan 27, 2013

Right. The way node: and the other commands work has always been a bit hacky, working around fabric. This could have been fixed by #141.

Can you please try with current master again?

Contributor

michaelballantyne commented Jan 28, 2013

Got this error:
Fatal error: Needed to prompt for a connection or sudo password (host: sls.my-domain.com), but input would be ambiguous in parallel mode

Owner

tobami commented Jan 28, 2013

There was a bug in the concurrent code that made it run always in parallel. Current master should now run sequentially again if you don't specify "--concurrency", so you can try again

Contributor

michaelballantyne commented Jan 28, 2013

I think the problem is actually worse now! I have an IdentityFile configured in my ssh conf (and ssh -F config_file sls connects fine), but littlechef prompts for a password:

fix node:sls

== Configuring sls ==
[sls.my-domain.com] Login password for 'ubuntu':
Stopped.

Last build the plain node: task worked but others did not. Now all prompt.

@tobami tobami closed this in 67bb45e Jan 30, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment