This really seems like something that should “Just Work”, even if
’hostname -f’ doesn’t return a FQDN for Ohai to parse. This was just
an fresh Ubuntu VM with all defaults running on bridged DHCP. I
didn’t really didn’t care about the domain name at that point, and the
solution wasn’t obvious until you pointed me to dig into the source of
What if it just defaulted to ‘localdomain’? Or at least provided a
global override to do so? Or at a minimum a descriptive error message
for the root cause and some suggestions to fix it. Are you open to
any of those solutions?
On Sun, Jun 20, 2010 at 12:02 AM, Chad Woolley email@example.com wrote:
Thanks, that helped me track it down.
My specific problem is that I was using a ubuntu/debian VM with
bridged networking and dhcp, and I needed to make sure that
/etc/hostname and /etc/hosts 127.0.1.1 entry had a FQDN which ended in
my auto-assigned Top-Level-Domain from DHCP. I just had a single
hostname with no TLD, and ‘ohai domain’ returned empty.
Then ‘hostname --fqdn’ worked, which is what ‘ohai domain’ calls under
On Sat, Jun 19, 2010 at 10:43 PM, Daniel DeLeo firstname.lastname@example.org wrote:
The bootstrap recipe relies on your domain name being set, which you
can do by editing your /etc/hosts file. You can check that chef has
the right value by running
ohai domain at the command line.
On Sat, Jun 19, 2010 at 10:12 PM, Chad Woolley email@example.com wrote:
This line in the bootstrap cookbook:
Is giving this error:
DEBUG: Loading attributes from
method_missing': Attribute domain is not defined! (ArgumentError) from /home/ubuntu/.rvm/gems/ruby-1.8.7-p174/gems/chef-0.8.16/bin/../lib/chef/node.rb:252:insend’
method_missing' from /home/ubuntu/chef/railsci_chef_repo/cookbooks/opscode/bootstrap/attributes/default.rb:52:infrom_file’
This is using latest gem chef (0.8.16)