I installed chef-client on a Linux node, and it seems to have successfully connected to my chef server. However, when I do: chef node list
, it appears as "localhost".
Why doesn't chef pick up the proper name of the node? If I ask for more details, I see:
$ chef node show localhost
node Name: localhost
Environment: _default
FQDN: localhost
IP: 192.168.1.5
Run List:
Roles:
Recipes:
Platform: ubuntu 11.10
It has a proper domain name set up. For example, if I do: hostname
, it returns "mynodename", not "localhost".
How is chef determining the name of the node? And why does it have the proper name showing in FQDN?
EDIT: In response to cjc below, here's some of the output from ohai | grep host
:
(Note: this node is running on EC2)
"fqdn": "localhost",
"hostname": "mynodename",
"public_hostname": "ec2-...-.amazonaws.com",
"local_hostname": "ip-...ec2.internal",
"hostname": "ip-...ec2.internal",
Also, hostname -s is giving the expected output:
$ hostname -s
mynodename