[chef] Re: Re: Re: Re: apt package provider: a lot of return code 100 on apt-get


Chronological Thread 
  • From: Seth Chisamore < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: apt package provider: a lot of return code 100 on apt-get
  • Date: Wed, 6 Oct 2010 22:15:37 -0700

Ringo,
Just follow Dan's instructions above to create a custom bootstrap ERB, then set log_info to :debug vs :info.  

So if you copied http://github.com/opscode/chef/blob/master/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb to ~/.chef/bootstrap/debug.erb

you would change line 25 from:

log_level        :info

to

log_level        :debug

You would then call knife bootstrap with the flag "--template-file ~/.chef/bootstrap/debug.erb"

More information about custom bootstrap templates can be found here:
http://help.opscode.com/faqs/chefbasics/knife (see "BOOTSTRAP SUB-COMMANDS" section)
http://wiki.opscode.com/display/chef/Knife+Bootstrap

Seth

--
Opscode, Inc.
Seth Chisamore, Technical Evangelist
T: (404) 348-0505 E: " target="_blank">
Twitter, IRC, Github: schisamo



On Wed, Oct 6, 2010 at 4:27 AM, Ringo De Smet < "> > wrote:
On 1 October 2010 09:44, Ringo De Smet < "> > wrote:
> Dan,
>
> On 30 September 2010 17:19, Daniel DeLeo < "> > wrote:
>> You'll have to modify the bootstrap script. Knife supports templates,
>> including user-defined ones, for bootstrap scripts. So copy the
>> bootstrap script from the source:
>>
>> http://github.com/opscode/chef/tree/master/chef/lib/chef/knife/bootstrap/
>>
>> to ~/.chef/bootstrap/debug.erb and modify it to run chef-client with
>> `-l debug`. Then run `knife bootstrap` with `-d debug`
>
> I did this, but it is still not what I want. Using the -l option, the
> knife bootstrap runs in debug mode, but at that point in time,
> everything is still OK. At the end of the run, the bootstrap
> daemonizes the chef-client, and *that* first run gives apt-update and
> apt-get errors. However, I bootstrap using apt packages and the
> /etc/chef/client.rb file has logging set to :info. How can I get the
> logging set to :debug in that file at bootstrap time? I tried to set
> the log_level via debconf-set-selections (I bootstrap the APT way),
> but that isn't set in the initial client.rb file.
>
> Any idea how to set log_level to :debug in the initial /etc/chef/client.rb file?

Anyone?

Ringo




Archive powered by MHonArc 2.6.16.

§