[英]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. ohai不知何故在特定主机上获取了我的一个LXC容器的ipaddress,而不是与eth0接口关联的ip地址。
$ 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. 当我重新做饭时,ohai再次运行,但是它仍然选择了不正确的ipaddress。
However, if I run ohai as a standalone execution (ie not inside a chef-run), it picks up the correct eth0 address. 但是,如果我将ohai作为独立执行程序运行(即不在内部运行),它将选择正确的eth0地址。
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 (ie without using a recipe)? 此外,无论如何,我是否可以使用刀(即不使用配方)更改ipaddress?
Thanks-in-advance 提前致谢
有一些计划好的工作可以使它更具可配置性,但是现在,如果您知道要使用eth0
,请改为使用node['network']['interfaces']['eth0']
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.