reference to ssh config file

119 views
Skip to first unread message

Robin Wenglewski

unread,
Dec 30, 2011, 10:34:23 AM12/30/11
to littlechef
Hi guys,

my auth.cfg contains

[userinfo]
ssh-config = /Users/robin/.ssh/config

In this file, I define

Host h1
HostName 78.46.217.235
User root

Now what I gather from https://github.com/tobami/littlechef this
should work. However, when running "fix node:h1 deploy_chef" I
get

Fatal error: Name lookup failed for h1

Aborting.

Can anyone help with that? I would like to avoid modifying /etc/hosts.

Cheers,
Robin

Miquel Torres

unread,
Dec 31, 2011, 5:25:00 AM12/31/11
to littl...@googlegroups.com
Hi Robin,

I just checked and it is a bug. While the ssh credentials are properly
read, LittleChef uses Fabric's "host_string" to ssh into each node. So
at first sight a two line patch would fix it
=============
https://github.com/tobami/littlechef/blob/master/littlechef/lib.py#L386

+ if 'hostname' in credentials:
+ credentials['host_string'] = credentials['hostname']
=============

And indeed it does. The problem is that while you are telling
LittleChef that you want to fix node "h1", internally the host_string
is being changed to the IP defined in the ssh config file, which will
cause LittleChef to believe that the saving (the first run) and
reading of the node data should happen at
nodes/IP.json

instead of at
nodes/h1.json

Which, while it at least works, it is not very nice.
I need to take a closer look at how we can resolve this.


2011/12/30 Robin Wenglewski <ro...@wenglewski.de>:

Miquel Torres

unread,
Jan 5, 2012, 11:54:12 AM1/5/12
to littlechef
@Robin

any further thoughts on how we could solve this?

I have created an issue to continue discussion:
https://github.com/tobami/littlechef/issues/78


On Dec 31 2011, 11:25 am, Miquel Torres <tob...@googlemail.com> wrote:
> Hi Robin,
>
> I just checked and it is a bug. While the ssh credentials are properly
> read, LittleChef uses Fabric's "host_string" to ssh into each node. So
> at first sight a two line patch would fix it
> =============https://github.com/tobami/littlechef/blob/master/littlechef/lib.py#L386
Reply all
Reply to author
Forward
0 new messages