- From: Chad Woolley <
>
- To:
- Subject: [chef] Re: Re: 'Attribute domain is not defined' in bootstrap cookbook
- Date: Sun, 20 Jun 2010 22:24:28 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=fwvdjC344nbTaH3f4bqDp9S7HIhdEZMNzjvGEBNmFREqLTJE2CFJHq4lZkh5Wsp1Ea LfVeTgmrPNV8V3X2j1crVhMHr21PC76VHqoyoWuRbY7deZ03EgJnBcK+ifEhT5T86Ce/ 1wCg/r1df+zvmtKK72cmAqKYUQvROFlF0Gsmw=
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
Ohai.
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?
Thanks,
-- Chad
On Sun, Jun 20, 2010 at 12:02 AM, Chad Woolley
<
>
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
>
the covers.
>
>
On Sat, Jun 19, 2010 at 10:43 PM, Daniel DeLeo
>
<
>
>
wrote:
>
> Ohai!
>
> 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.
>
>
>
> HTH,
>
> Dan DeLeo
>
>
>
> On Sat, Jun 19, 2010 at 10:12 PM, Chad Woolley
>
> <
>
>
> wrote:
>
>> This line in the bootstrap cookbook:
>
>>
>
>> http://github.com/opscode/cookbooks/blob/master/bootstrap/attributes/default.rb#L52
>
>>
>
>> Is giving this error:
>
>>
>
>> DEBUG: Loading attributes from
>
>> /home/ubuntu/chef/railsci_chef_repo/cookbooks/opscode/bootstrap/attributes/default.rb
>
>> /home/ubuntu/.rvm/gems/ruby-1.8.7-p174/gems/chef-0.8.16/bin/../lib/chef/node/attribute.rb:387:in
>
>> `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:in
>
>> `send'
>
>> from
>
>> /home/ubuntu/.rvm/gems/ruby-1.8.7-p174/gems/chef-0.8.16/bin/../lib/chef/node.rb:252:in
>
>> `method_missing'
>
>> from
>
>> /home/ubuntu/chef/railsci_chef_repo/cookbooks/opscode/bootstrap/attributes/default.rb:52:in
>
>> `from_file'
>
>>
>
>> This is using latest gem chef (0.8.16)
>
>>
>
>
>
Archive powered by MHonArc 2.6.16.