octohost/octohost-cookbook

While deploying to droplet, Chef::Exceptions::FileNotFound /etc/nginx/containers.conf

romaninsh opened this issue · 1 comments

I clearly see this file inside git and local folder (files/default/containers.conf), but build process fails:

digitalocean: * cookbook_file[/etc/nginx/containers.conf] action create
digitalocean: - create new file /etc/nginx/containers.conf
digitalocean: ================================================================================
digitalocean: Error executing action `create` on resource 'cookbook_file[/etc/nginx/containers.conf]'
digitalocean: ================================================================================
digitalocean:
digitalocean: Chef::Exceptions::FileNotFound
digitalocean: ------------------------------
digitalocean: Cookbook 'octohost' (0.24.0) does not contain a file at any of these locations:
digitalocean: files/ubuntu-14.04/containers.conf
digitalocean: files/ubuntu/containers.conf
digitalocean: files/default/containers.conf
digitalocean:
digitalocean: This cookbook _does_ contain: ['/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/default-proxy','/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/ssl.key','/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/proxy.conf','/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/upstream.conf','/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/logrotate','/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/proxy','/tmp/packer-chef-solo/cookbooks-0/octohost/files/default/ssl.crt']
digitalocean:
digitalocean: Resource Declaration:
digitalocean: ---------------------
digitalocean: # In /tmp/packer-chef-solo/cookbooks-0/octohost/recipes/openresty.rb
digitalocean:
digitalocean: 40: cookbook_file '/etc/nginx/containers.conf' do
digitalocean: 41:   source 'containers.conf'
digitalocean: 42:   owner 'root'
digitalocean: 43:   group 'root'
digitalocean: 44:   mode '0644'
digitalocean: 45:   notifies :restart, 'service[proxy]', :delayed
digitalocean: 46: end
digitalocean: 47:
digitalocean:
digitalocean: Compiled Resource:
digitalocean: ------------------
digitalocean: # Declared in /tmp/packer-chef-solo/cookbooks-0/octohost/recipes/openresty.rb:40:in `from_file'
digitalocean:
digitalocean: cookbook_file("/etc/nginx/containers.conf") do
digitalocean: provider Chef::Provider::CookbookFile
digitalocean: action "create"
digitalocean: retries 0
digitalocean: retry_delay 2
digitalocean: guard_interpreter :default
digitalocean: path "/etc/nginx/containers.conf"
digitalocean: backup 5
digitalocean: atomic_update true
digitalocean: source "containers.conf"
digitalocean: cookbook_name :octohost
digitalocean: recipe_name "openresty"
digitalocean: mode "0644"
digitalocean: owner "root"
digitalocean: group "root"
digitalocean: end
digitalocean:
digitalocean: Recipe: sysstat::default
digitalocean: * service[sysstat] action restart
digitalocean: - restart service service[sysstat]
digitalocean: Recipe: consul::default
digitalocean: * service[consul] action restart
digitalocean: - restart service service[consul]
digitalocean: Recipe: octohost::openresty
digitalocean: * service[proxy] action restart
digitalocean: ================================================================================
digitalocean: Error executing action `restart` on resource 'service[proxy]'
digitalocean: ================================================================================
digitalocean:
digitalocean: Errno::ENOENT
digitalocean: -------------
digitalocean: No such file or directory - /etc/init.d/proxy stop
digitalocean:
digitalocean: Resource Declaration:
digitalocean: ---------------------
digitalocean: # In /tmp/packer-chef-solo/cookbooks-0/octohost/recipes/openresty.rb
digitalocean:
digitalocean: 111: service 'proxy' do
digitalocean: 112:   supports :status => true # rubocop:disable HashSyntax
digitalocean: 113:   action [:enable, :start]
digitalocean: 114: end
digitalocean: 115:
digitalocean:
digitalocean: Compiled Resource:
digitalocean: ------------------
digitalocean: # Declared in /tmp/packer-chef-solo/cookbooks-0/octohost/recipes/openresty.rb:111:in `from_file'
digitalocean:
digitalocean: service("proxy") do
digitalocean: action [:enable, :start]
digitalocean: supports {:status=>true}
digitalocean: retries 0
digitalocean: retry_delay 2
digitalocean: guard_interpreter :default
digitalocean: service_name "proxy"
digitalocean: pattern "proxy"
digitalocean: cookbook_name :octohost
digitalocean: recipe_name "openresty"
digitalocean: end
digitalocean:
digitalocean:
digitalocean: Running handlers:
digitalocean: [2014-07-13T20:17:47-04:00] ERROR: Running exception handlers
digitalocean: Running handlers complete
digitalocean: [2014-07-13T20:17:47-04:00] ERROR: Exception handlers complete
digitalocean: [2014-07-13T20:17:47-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
digitalocean: Chef Client failed. 106 resources updated in 268.738161128 seconds
digitalocean: [2014-07-13T20:17:47-04:00] ERROR: Chef::Exceptions::MultipleFailures
digitalocean: [2014-07-13T20:17:47-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Happened due to packer being directly and not part of rake build.