Chef client bootstraping with the wrong ethernet interface

275 views Asked by At

Hi I am bootstrapping a new server node to my chef environment, but on this particular machine, I have 2 Ethernet interfaces, and when I bootstrap this machine, always get the wrong interface for this machine.

Is that any parameter that can be passed to force the bootstrapping process to ignore an interface or to use a specific interface on this process?

-- edit

Basically, this server that I want to bootstrap is my PBX manager server, it has 2 Ethernet connections, eth0 that connects all internal phones and eth1 that connects to the rest of my network, so all my clients can authenticate with softphones, and where the rest of my servers are.

When I run the command to bootstrap, this server appears on the server nodes list, but with the wrong IP. Follow the command I execute, and a SS from my server network configuration and my Chef result.

knife bootstrap 192.168.56.102 --ssh-user pbxmngusr --identity-file ./key --node-name pbxmngr

Server network interfaces

Chef Manager screen. The yellow one is my server with the wrong IP

1

There are 1 answers

0
coderanger On BEST ANSWER

What you are seeing in the web ui there is the ipaddress node attribute from Ohai. Chef itself doesn't care about this value, in situations with multiple interfaces it tries to use the address corresponding to the default route. You can find all interfaces under node["network"]["interfaces"] if you need to do more complex operations.