- From: Arnold Krille <
>
- To:
- Subject: [chef] Re: Ohai not selecting IP address
- Date: Wed, 9 Oct 2013 11:52:42 +0200
Am Fri, 4 Oct 2013 18:54:08 +0000
schrieb Ted Fines
<
>:
>
On a bare metal system we have two network interfaces bonded.
>
They're also trunked, with a native VLAN coming through untagged,
>
along with another VLAN.
>
>
The interfaces are: bond0, bond0:0 and bond0.400. bond0 has no IP
>
address; bond0:0 has the IP address of the native VLAN, and is the
>
'system' IP; bond0.400 is the NFS interface.
>
>
The hostname of the system is its FQDN. It is in /etc/hosts, and
>
both forward and reverse DNS work correctly.
>
>
When registering the node with chef server, Ohai incorrectly decides
>
that bond0.400 is the system IP. I tried fooling it by temporarily
>
turning off bond0.400 and re-registering, but then Ohai can't figure
>
out what the IP is.
>
>
Googling indicates this is not an unheard of problem. Here's the
>
relevant ohai output.
>
>
"bond0:0": {
>
"addresses": {
>
"10.46.144.11": {
>
"scope": "Global",
>
"broadcast": "10.46.144.255",
>
"prefixlen": "24",
>
"family": "inet",
>
"netmask": "255.255.255.0"
>
}
>
}
>
},
>
...
>
"ipaddress": null,
>
>
While I realize this is a more complicated configuration that many
>
systems, it is not uncommon in servers, and not done in a
>
non-standard way. I realize it is tricky to figure out what 'the' IP
>
is for a system when a system has more than one. But ohai is just
>
failing here.
Afaik Ohai chooses the nodes ipaddress from the interface/address the
default-route uses. So if your server has the default route via
bond0.400, ohai will use that for node['ipaddress'].
Have fun,
Arnold
Archive powered by MHonArc 2.6.16.