Chef-client not started

Hi,

I’m trying to deploy and start chef-client using recipe chef-client. It doesn’t work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable

    • enable service service[chef-client]
  • service[chef-client] action start

    • start service service[chef-client]
  • service[chef-client] action restart

    • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON

Something weird happened. Now everything is ok with both versions (I've done 20 tests before) ... I've tried deleting and reinstalling them but everything is fine now :frowning:
I'll let you know if it happens again ..

sorry for your time

Cyril SCETBON

On 16 Jan 2014, at 17:53, Cyril Scetbon cyril.scetbon@free.fr wrote:

Hi,

I'm trying to deploy and start chef-client using recipe chef-client. It doesn't work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable

    • enable service service[chef-client]
  • service[chef-client] action start

    • start service service[chef-client]
  • service[chef-client] action restart

    • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON

It could be related to this issue:

https://tickets.opscode.com/browse/COOK-1825

On Jan 16, 2014, at 11:53 AM, Cyril Scetbon cyril.scetbon@free.fr wrote:

Hi,

I'm trying to deploy and start chef-client using recipe chef-client. It doesn't work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable
  • enable service service[chef-client]
  • service[chef-client] action start
  • start service service[chef-client]
  • service[chef-client] action restart
  • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON

yep it looks really similar. But why it works now that's the question :smiley:

--
Cyril SCETBON

On 16 Jan 2014, at 18:14, Eric Herot eric.opscode@herot.com wrote:

It could be related to this issue:

https://tickets.opscode.com/browse/COOK-1825

On Jan 16, 2014, at 11:53 AM, Cyril Scetbon cyril.scetbon@free.fr wrote:

Hi,

I'm trying to deploy and start chef-client using recipe chef-client. It doesn't work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable
  • enable service service[chef-client]
  • service[chef-client] action start
  • start service service[chef-client]
  • service[chef-client] action restart
  • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON

okay, I have it again now :

ubuntu@ip-10-0-1-59:~$ ps -ef|grep -i chef-client
ubuntu 4990 4889 0 17:45 pts/0 00:00:00 grep --color=auto -i chef-client

if anyone has a way to make it work all the time with a small hardcoded fix ..

Cyril SCETBON

On 16 Jan 2014, at 18:38, Cyril Scetbon cyril.scetbon@free.fr wrote:

yep it looks really similar. But why it works now that's the question :smiley:

--
Cyril SCETBON

On 16 Jan 2014, at 18:14, Eric Herot eric.opscode@herot.com wrote:

It could be related to this issue:

https://tickets.opscode.com/browse/COOK-1825

On Jan 16, 2014, at 11:53 AM, Cyril Scetbon cyril.scetbon@free.fr wrote:

Hi,

I'm trying to deploy and start chef-client using recipe chef-client. It doesn't work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable
  • enable service service[chef-client]
  • service[chef-client] action start
  • start service service[chef-client]
  • service[chef-client] action restart
  • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON

The "solution" I came up with was to send an email instructing the admin to restart the chef-client (but note that if this accidentally runs during a convergence, you will end up with a stopped chef-client service like you have now). Other possibilities include setting a cron job to bounce it occasionally, or running the whole convergence from cron (you will lose the splay factor). Unfortunately it seems like it is quite impossible to successfully bounce chef from within chef, at least as currently written.

One possibility for why it doesn't always happen is that it isn't always finding a reason to notify => restart the chef-client service...

On Jan 16, 2014, at 12:38 PM, Cyril Scetbon cyril.scetbon@free.fr wrote:

yep it looks really similar. But why it works now that's the question :smiley:

--
Cyril SCETBON

On 16 Jan 2014, at 18:14, Eric Herot eric.opscode@herot.com wrote:

It could be related to this issue:

https://tickets.opscode.com/browse/COOK-1825

On Jan 16, 2014, at 11:53 AM, Cyril Scetbon cyril.scetbon@free.fr wrote:

Hi,

I'm trying to deploy and start chef-client using recipe chef-client. It doesn't work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable
  • enable service service[chef-client]
  • service[chef-client] action start
  • start service service[chef-client]
  • service[chef-client] action restart
  • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON

Okay, I will use the chef-client::cron recipe

Thanks

Cyril SCETBON

On 16 Jan 2014, at 18:55, Eric Herot eric.opscode@herot.com wrote:

The "solution" I came up with was to send an email instructing the admin to restart the chef-client (but note that if this accidentally runs during a convergence, you will end up with a stopped chef-client service like you have now). Other possibilities include setting a cron job to bounce it occasionally, or running the whole convergence from cron (you will lose the splay factor). Unfortunately it seems like it is quite impossible to successfully bounce chef from within chef, at least as currently written.

One possibility for why it doesn't always happen is that it isn't always finding a reason to notify => restart the chef-client service...

On Jan 16, 2014, at 12:38 PM, Cyril Scetbon cyril.scetbon@free.fr wrote:

yep it looks really similar. But why it works now that's the question :smiley:

--
Cyril SCETBON

On 16 Jan 2014, at 18:14, Eric Herot eric.opscode@herot.com wrote:

It could be related to this issue:

https://tickets.opscode.com/browse/COOK-1825

On Jan 16, 2014, at 11:53 AM, Cyril Scetbon cyril.scetbon@free.fr wrote:

Hi,

I'm trying to deploy and start chef-client using recipe chef-client. It doesn't work with cookbook version 3.2.0 and chef 11.8.2. That is to say, chef-client does not start at the end even if it says :

  • service[chef-client] action enable
  • enable service service[chef-client]
  • service[chef-client] action start
  • start service service[chef-client]
  • service[chef-client] action restart
  • restart service service[chef-client]

Chef Client finished, 10 resources updated

at the end of the deployment.

However, if I use cookbook version 1.2.0 it works as expected !

ubuntu@ip-10-0-1-134:~$ ps -ef|grep -i chef
root 3232 1 0 16:10 ? 00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 300 -L /var/log/chef/client.log

outputs of chef are the same with both versions but not the results.

Thanks

Cyril SCETBON