I am a newbie to the chef and knife, I am running couple of ec2 instances and have install chef-client and I can see all the instances in the node list of the chef, but couple of them are missing FQDN which is causing hell lot of problem, here is the output when I run knife node show node_name
Environment: _default
FQDN:
IP:
Run List:
Roles:
Recipes:
Platform:
Tags:
You can see expect Env rest all other are blank. How do I fix this problem. Kindly help me out
The chef-client program need to run, successfully, before any information will be shown by knife-node. The run list and environment can be set via knife-edit, but the other fields are populated by data returned by ohai, and this only happens when chef-client runs.
Tim Potter's answer is the most likely - chef-client will only save attributes to the server when
node.save
is called in a recipe, and when the run completes successfully. Carefully check your chef-client logs to confirm that no exceptions were raised.Another possibility is that
ohai
is missing or broken, leaving you without any automatic attributes on the node (but this would normally lead to errors in the run).