chef-solo hangs at the end installing redis -


chef-solo hangs @ end when installing redis if chef waiting event occur. here output when had kill ctrl+c.

[2013-05-14t15:55:27+00:00] error: running exception handlers
[2013-05-14t15:55:27+00:00] error: exception handlers complete chef client failed. 8 resources updated
[2013-05-14t15:55:27+00:00] fatal: stacktrace dumped /home/ubuntu/cache/chef-stacktrace.out [2013-05-14t15:55:27+00:00] fatal: chef::exceptions::multiplefailures: multiple failures occurred:
* systemexit occurred in chef run: service[redis] (redis::default line 107) had error: systemexit: exit
* chef::exceptions::exec occurred in delayed notification: service[redis] (redis::default line 83) had error: chef::exceptions::exec: /sbin/start redis returned 1, expected 0

i new chef , unable figure out why happening. has noticed behaviour before?

here recipe file

package "build-essential"   action :install end  user node[:redis][:user]   action :create   system true   shell "/bin/false" end  directory node[:redis][:dir]   owner node[:redis][:user]   group node[:redis][:user]   mode "0755"   action :create end  directory node[:redis][:data_dir]   owner node[:redis][:user]   group node[:redis][:user]   mode "0755"   action :create end  directory node[:redis][:log_dir]   owner node[:redis][:user]   group node[:redis][:user]   mode "0755"   action :create end  remote_file "#{chef::config[:file_cache_path]}/redis-2.6.10.tar.gz"   source "http://redis.googlecode.com/files/redis-2.6.10.tar.gz"   action :create_if_missing end  # adding 'make test' causes install freeze reason. bash "compile_redis_source"   cwd chef::config[:file_cache_path]   code <<-eoh     tar zxf redis-2.6.10.tar.gz     cd redis-2.6.10     make && sudo make install     # give permissions executables copied to.     chown -r redis:redis /usr/local/bin   eoh   creates "/usr/local/bin/redis-server" end  service "redis"   provider chef::provider::service::upstart   subscribes :restart, resources(:bash => "compile_redis_source")   supports :restart => true, :start => true, :stop => true end  template "redis.conf"   path "#{node[:redis][:dir]}/redis.conf"   source "redis.conf.erb"   owner node[:redis][:user]   group node[:redis][:user]   mode "0644"   notifies :restart, resources(:service => "redis") end  template "redis.upstart.conf"   path "/etc/init/redis.conf"   source "redis.upstart.conf.erb"   owner node[:redis][:user]   group node[:redis][:user]   mode "0644"   notifies :restart, resources(:service => "redis") end  service "redis"   action [:enable, :start] end 

there 2 service "redis" resource statements, problem? or how chef workout in case, merge single resource when running?

using upstart , here redis.upstart.conf.erb file. not sure if wrong this. order of statement matter in file?

#!upstart description "redis server" emits redis-server  # run when local fs becomes available start on local-filesystems stop on shutdown  setuid redis setgid redis expect fork  # respawn unless redis dies 10 times in 5 seconds #respawn #respawn limit 10 5  # start default instance instance $name env name=redis #instance $name  # run redis correct user #setuid redis #setgid redis  # run redis correct config file instance exec /usr/local/bin/redis-server /etc/redis/redis.conf  respawn #respawn limit 10 5 

i think dmytro on right path, not exactly.

i see using upstart service provider in chef. please check upstart config redis-server expect statement. if have expect fork or expect daemon statement in there, means when starting redis-server, upstart waiting redis service fork once or twice respectively. if have daemonize no in redis.conf, redis process never fork, , therefore upstart hangs @ execution of init script.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -