user2313505
user2313505

Reputation:

Ohai is not picking up correct ipaddress

Somehow, ohai picked up the ipaddress of one of my LXC containers on a particular host instead of the ip address associated with the eth0 interface.

$ knife node show my-obscured-host -a ipaddress
my-obscured-host:
  ipaddress: 172.24.0.243

When I re-chef, ohai is run again, yet it still picks up the incorrect ipaddress.

However, if I run ohai as a standalone execution (i.e. not inside a chef-run), it picks up the correct eth0 address.

This does not make sense. Why do you think it is not changing the address?

Also, is there anyway I can change the ipaddress using knife (i.e. without using a recipe)?

Thanks-in-advance

Upvotes: 0

Views: 1259

Answers (1)

coderanger
coderanger

Reputation: 54251

There is some planned work to make this more configurable, but for now if you know you want eth0, use the data in node['network']['interfaces']['eth0'] instead.

Upvotes: 1

Related Questions