Permalink
Browse files

Merge branch 'COOK-1903'

  • Loading branch information...
2 parents 6b4708a + baa7a06 commit 7cb0c3851f57f9dc3f4e95627f54d3bde8f33e82 @jtimberman jtimberman committed Dec 5, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 definitions/runit_service.rb
@@ -41,6 +41,29 @@
action :create
end
+ directory sv_dir_name + "/supervise" do
+ owner params[:owner]
+ group params[:group]
+ mode 0755
+ action :create
+ end
+
+ file sv_dir_name + "/supervise/ok" do
+ owner params[:owner]
+ group params[:group]
+ mode 0644
+ action :create
+ only_if { File.exists? sv_dir_name + "/supervise/ok" }
+ end
+
+ file sv_dir_name + "/supervise/control" do
+ owner params[:owner]
+ group params[:group]
+ mode 0600
+ action :create
+ only_if { File.exists? sv_dir_name + "/supervise/control" }
+ end
+
unless params[:nolog]
directory "#{sv_dir_name}/log" do
owner params[:owner]

3 comments on commit 7cb0c38

v+

stat("/etc/sv/mms-agent/supervise/ok", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
stat("/etc/sv/mms-agent/supervise/ok", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
stat("/etc/sv/mms-agent/supervise/ok", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
stat("/etc/sv/mms-agent/supervise/ok", {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
stat("/var/cache/chef/checksums/chef-file--etc-sv-mms-agent-supervise-ok", 0x7fff7d929500) = -1 ENOENT (No such file or directory)
open("/etc/sv/mms-agent/supervise/ok", O_RDONLY...

v-

And freeze. Remove that change and everything start working again.

I think the problem is that when we call load_current_resource we try to calculate the checksum of the file: https://github.com/opscode/chef/blob/master/lib/chef/provider/file.rb#L228

Eventually this opens the file and tries to read it all:

https://github.com/opscode/chef/blob/master/lib/chef/checksum_cache.rb#L170

but since supervise/ok is a FIFO, it'll take quite some time before we reach the end ;)

Same issue with me :(

Please sign in to comment.