Problem when starting and stoping chef-client as init service

Hi chefs,

I’m having a problem when using chef debian init scripts. The
screenshot attached explains it better. The problem is that chef init
script does not behave consistently; It does not stop chef-client when
you try it but returns success, you have to manually kill chef-client.
It returns fail when starting it but the client is started.

I’ve seen this behavior at least on 0.8.16 and 0.9.0 also on both
ubuntu 8.04 and 10.04.

Is it a bug on the script?, does anyone know about this problem?.

Thanks in advance.

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

Hola Jacobo!
Check the pidfile variable in /etc/init.d/chef-client and see if it's the
same than in /etc/chef/client.rb. Otherwise when starting the client it will
create the pidfile where specified in the /etc/chef/client.rb configuration,
but will try to stop it checking the pidfile specified in the init.d one.

:smiley: hope it helps

{ :name => "Albert Llop" }

On 13 July 2010 12:58, Jacobo García jacobo.garcia@gmail.com wrote:

Hi chefs,

I'm having a problem when using chef debian init scripts. The
screenshot attached explains it better. The problem is that chef init
script does not behave consistently; It does not stop chef-client when
you try it but returns success, you have to manually kill chef-client.
It returns fail when starting it but the client is started.

I've seen this behavior at least on 0.8.16 and 0.9.0 also on both
ubuntu 8.04 and 10.04.

Is it a bug on the script?, does anyone know about this problem?.

Thanks in advance.

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

That worked fine.

Thanks!

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

On Tue, Jul 13, 2010 at 1:07 PM, Albert Llop mrsimo@gmail.com wrote:

Hola Jacobo!
Check the pidfile variable in /etc/init.d/chef-client and see if it's the
same than in /etc/chef/client.rb. Otherwise when starting the client it will
create the pidfile where specified in the /etc/chef/client.rb configuration,
but will try to stop it checking the pidfile specified in the init.d one.

:smiley: hope it helps

{ :name => "Albert Llop" }

On 13 July 2010 12:58, Jacobo García jacobo.garcia@gmail.com wrote:

Hi chefs,

I'm having a problem when using chef debian init scripts. The
screenshot attached explains it better. The problem is that chef init
script does not behave consistently; It does not stop chef-client when
you try it but returns success, you have to manually kill chef-client.
It returns fail when starting it but the client is started.

I've seen this behavior at least on 0.8.16 and 0.9.0 also on both
ubuntu 8.04 and 10.04.

Is it a bug on the script?, does anyone know about this problem?.

Thanks in advance.

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

Awesome!

{ :name => "Albert Llop" }

On 13 July 2010 16:27, Jacobo García jacobo.garcia@gmail.com wrote:

That worked fine.

Thanks!

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

On Tue, Jul 13, 2010 at 1:07 PM, Albert Llop mrsimo@gmail.com wrote:

Hola Jacobo!
Check the pidfile variable in /etc/init.d/chef-client and see if it's the
same than in /etc/chef/client.rb. Otherwise when starting the client it
will
create the pidfile where specified in the /etc/chef/client.rb
configuration,
but will try to stop it checking the pidfile specified in the init.d one.

:smiley: hope it helps

{ :name => "Albert Llop" }

On 13 July 2010 12:58, Jacobo García jacobo.garcia@gmail.com wrote:

Hi chefs,

I'm having a problem when using chef debian init scripts. The
screenshot attached explains it better. The problem is that chef init
script does not behave consistently; It does not stop chef-client when
you try it but returns success, you have to manually kill chef-client.
It returns fail when starting it but the client is started.

I've seen this behavior at least on 0.8.16 and 0.9.0 also on both
ubuntu 8.04 and 10.04.

Is it a bug on the script?, does anyone know about this problem?.

Thanks in advance.

Jacobo García López de Araujo
blog: http://robotplaysguitar.com
http://workingwithrails.com/person/13395-jacobo-garc-a

On 13 Jul 2010, at 16:27, Jacobo García wrote:

On Tue, Jul 13, 2010 at 1:07 PM, Albert Llop mrsimo@gmail.com wrote:

Hola Jacobo!
Check the pidfile variable in /etc/init.d/chef-client and see if it's the
same than in /etc/chef/client.rb. Otherwise when starting the client it will
create the pidfile where specified in the /etc/chef/client.rb configuration,
but will try to stop it checking the pidfile specified in the init.d one.

I'm seeing the same thing, but in my vanilla install of chef 0.96 on lucid, /etc/chef/client.rb is empty.

Marcus

Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info@hand CRM solutions
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/

Well then, I guess it uses the defaults? It must use /srv/chef/run or
something like that, so you should modify the scripts in /etc/init.d. But I
didn't know you could even have chef-client working without a config file so
no idea.

Goodluck!

{ :name => "Albert Llop" }

On 13 July 2010 16:49, Marcus Bointon marcus@synchromedia.co.uk wrote:

On 13 Jul 2010, at 16:27, Jacobo García wrote:

On Tue, Jul 13, 2010 at 1:07 PM, Albert Llop mrsimo@gmail.com wrote:

Hola Jacobo!
Check the pidfile variable in /etc/init.d/chef-client and see if it's
the
same than in /etc/chef/client.rb. Otherwise when starting the client it
will
create the pidfile where specified in the /etc/chef/client.rb
configuration,
but will try to stop it checking the pidfile specified in the init.d
one.

I'm seeing the same thing, but in my vanilla install of chef 0.96 on lucid,
/etc/chef/client.rb is empty.

Marcus

Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
UK resellers of info@hand CRM solutions
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk/