我在现有食谱中添加了另一个模板,但食谱不会上传。这是我的代码:
/cookbook/recipe/default.rb
template "/opt/graphite/conf/blacklist.conf" do
source "blacklist.erb"
mode 0755
variables( :mac => node[:graphite][:blacklist][:mac] )
end
/cookbook/recipe/template/blacklist.erb
mac = <%= @mac %>
/cookbook/recipe/attributes/default.rb
default[:graphite][:blacklist][:mac] = "xyz\.mac"
这只是告诉厨师为石墨创建一个黑名单文件。我做错什么了?这是我的错误:
Uploading graphite [1.0.5]
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1u45f5v.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1mlzi8g.lock"]}ERROR: RestClient::InternalServerError: 500 Internal Server Error
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1pvrxcv.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1pl351l.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-1crdpij.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-v8ijj3.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-ufrny2.lock"]}
ERROR: Failed to upload #<Chef::CookbookVersion:0x00000001e2bcc8> : 500 Internal Server Error
{"error":["No such file or directory - /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-server-api-0.10.8.3/sandbox20121005-2129-jtztmr.lock"]}
/usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 500 Internal Server Error (RestClient::InternalServerError)
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/rest-client-1.6.7/lib/restclient/resource.rb:76:in `put'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:134:in `block in uploader_function_for'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:25:in `call'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:25:in `block (3 levels) in setup_worker_threads'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:24:in `loop'
from /usr/local/rvm/gems/ruby-1.9.3-p125/gems/chef-0.10.8.3/lib/chef/cookbook_uploader.rb:24:in `block (2 levels) in setup_worker_threads'