Runit cookbook error: Chef::Exceptions::Exec: /usr/bin/chpst

Hi,

When I use the runit cookbook, about 10% of the time I get the below
error and it kills the run. When I log int the box and I start, stop,
restart manually there is not a problem. So, why is there this issue
with the runit cookbook?

Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:
service[pixelServerMonitor] (rtb_server::default line 147) had an
error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv
restart /etc/service/pixelServerMonitor returned 1, expected 0

  1. Runit cookbook has some assumptions like timings before start.

  2. I suppose that You use "user 'root'" property. Try to remove it to
    exclude any chpst-behaviour (but chpst can't do your original behaviour).

2012/4/18 David Montgomery davidmontgomery@gmail.com

Hi,

When I use the runit cookbook, about 10% of the time I get the below
error and it kills the run. When I log int the box and I start, stop,
restart manually there is not a problem. So, why is there this issue
with the runit cookbook?

Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:
service[pixelServerMonitor] (rtb_server::default line 147) had an
error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv
restart /etc/service/pixelServerMonitor returned 1, expected 0

What does that mean?

I do this

include_recipe "runit"
runit_service "pixelServer"

Why the variability? There should be no variance for runit deciding to work.

On Thu, Apr 19, 2012 at 12:55 AM, Akzhan Abdulin
akzhan.abdulin@gmail.com wrote:

  1. Runit cookbook has some assumptions like timings before start.

  2. I suppose that You use "user 'root'" property. Try to remove it to
    exclude any chpst-behaviour (but chpst can't do your original behaviour).

2012/4/18 David Montgomery davidmontgomery@gmail.com

Hi,

When I use the runit cookbook, about 10% of the time I get the below
error and it kills the run. When I log int the box and I start, stop,
restart manually there is not a problem. So, why is there this issue
with the runit cookbook?

Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:
service[pixelServerMonitor] (rtb_server::default line 147) had an
error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv
restart /etc/service/pixelServerMonitor returned 1, expected 0

It's a race on whether runsvdir has picked up the new service or not.
You likely need to set a retries value on the service resource that
causes the error, as it will succeed later.

Adam

On Wed, Apr 18, 2012 at 10:22 AM, David Montgomery
davidmontgomery@gmail.com wrote:

What does that mean?

I do this

include_recipe "runit"
runit_service "pixelServer"

Why the variability? There should be no variance for runit deciding to work.

On Thu, Apr 19, 2012 at 12:55 AM, Akzhan Abdulin
akzhan.abdulin@gmail.com wrote:

  1. Runit cookbook has some assumptions like timings before start.

  2. I suppose that You use "user 'root'" property. Try to remove it to
    exclude any chpst-behaviour (but chpst can't do your original behaviour).

2012/4/18 David Montgomery davidmontgomery@gmail.com

Hi,

When I use the runit cookbook, about 10% of the time I get the below
error and it kills the run. When I log int the box and I start, stop,
restart manually there is not a problem. So, why is there this issue
with the runit cookbook?

Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:
service[pixelServerMonitor] (rtb_server::default line 147) had an
error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv
restart /etc/service/pixelServerMonitor returned 1, expected 0

--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: adam@opscode.com

Yeah..I agree but how, in a chef bootstrap, do I ignore that error so
I dont have to redo the bootstrap automatically? Like an try except
clause for >> runit_service "pixelServer"

thanks

On Thu, Apr 19, 2012 at 2:00 AM, Adam Jacob adam@opscode.com wrote:

It's a race on whether runsvdir has picked up the new service or not.
You likely need to set a retries value on the service resource that
causes the error, as it will succeed later.

Adam

On Wed, Apr 18, 2012 at 10:22 AM, David Montgomery
davidmontgomery@gmail.com wrote:

What does that mean?

I do this

include_recipe "runit"
runit_service "pixelServer"

Why the variability? There should be no variance for runit deciding to work.

On Thu, Apr 19, 2012 at 12:55 AM, Akzhan Abdulin
akzhan.abdulin@gmail.com wrote:

  1. Runit cookbook has some assumptions like timings before start.

  2. I suppose that You use "user 'root'" property. Try to remove it to
    exclude any chpst-behaviour (but chpst can't do your original behaviour).

2012/4/18 David Montgomery davidmontgomery@gmail.com

Hi,

When I use the runit cookbook, about 10% of the time I get the below
error and it kills the run. When I log int the box and I start, stop,
restart manually there is not a problem. So, why is there this issue
with the runit cookbook?

Wed, 18 Apr 2012 16:38:15 +0000] ERROR: Exception handlers complete
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out
[Wed, 18 Apr 2012 16:38:15 +0000] FATAL: Chef::Exceptions::Exec:
service[pixelServerMonitor] (rtb_server::default line 147) had an
error: Chef::Exceptions::Exec: /usr/bin/chpst -u root /usr/bin/sv
restart /etc/service/pixelServerMonitor returned 1, expected 0

--
Opscode, Inc.
Adam Jacob, Chief Customer Officer
T: (206) 619-7151 E: adam@opscode.com