chef-boneyard / push-jobs-cookbook

Development repository for Chef Cookbook push-jobs
https://supermarket.chef.io/cookbooks/push-jobs
Apache License 2.0
21 stars 43 forks source link

push-jobs 2.6.1 cookbook fails #57

Closed alexpop closed 8 years ago

alexpop commented 9 years ago

I gave the push-jobs cookbook version 2.6.1 a try on CentOS 6.6 with no override attributes and it failed with this error:

Recipe: push-jobs::service_runit
  * runit_service[opscode-push-jobs-client] action enable
    * directory[/etc/sv/opscode-push-jobs-client] action create (up to date)
    * template[/etc/sv/opscode-push-jobs-client/run] action create

      ================================================================================
      Error executing action `create` on resource 'template[/etc/sv/opscode-push-jobs-client/run]'
      ================================================================================

      Chef::Mixin::Template::TemplateError
      ------------------------------------
      757: unexpected token at 'opt/push-jobs-client'

      Cookbook Trace:
      ---------------
      /var/chef/cache/cookbooks/runit/libraries/provider_runit_service.rb:258:in `block in <class:RunitService>'

      Resource Declaration:
      ---------------------
      # In /var/chef/cache/cookbooks/runit/libraries/provider_runit_service.rb

       64:           template "#{sv_dir_name}/run" do
       65:             owner new_resource.owner
       66:             group new_resource.group
       67:             source "sv-#{new_resource.run_template_name}-run.erb"
       68:             cookbook template_cookbook
       69:             mode '0755'
       70:             variables(options: new_resource.options)
       71:             action :create
       72:           end
       73:

      Compiled Resource:
      ------------------
      # Declared in /var/chef/cache/cookbooks/runit/libraries/provider_runit_service.rb:64:in `block in <class:RunitService>'

      template("/etc/sv/opscode-push-jobs-client/run") do
        action [:create]
        retries 0
        retry_delay 2
        default_guard_interpreter :default
        path "/etc/sv/opscode-push-jobs-client/run"
        backup 5
        atomic_update true
        source "sv-opscode-push-jobs-client-run.erb"
        cookbook "push-jobs"
        variables {:options=>{"logging_level"=>"info", "node"=>{"push_jobs"=>{"package_url"=>nil, "package_checksum"=>"", "package_version"=>nil, "gem_url"=>nil, "gem_checksum"=>"", "config"=>{"template_cookbook"=>nil}, "whitelist"=>{"chef-client"=>"chef-client"}, "environment_variables"=>{"LC_ALL"=>"en_US.UTF-8"}, "chef"=>{"verify_api_cert"=>true, "ssl_verify_mode"=>:verify_peer, "chef_server_url"=>nil, "node_name"=>nil, "client_key_path"=>"/etc/chef/client.pem", "trusted_certs_path"=>"/etc/chef/trusted_certs", "install_path"=>nil, "exec_name"=>nil}, "service_string"=>"runit_service[push-jobs-client]", "init_style"=>"runit", "logging_level"=>"info"}}, "config"=>"/etc/chef/push-jobs-client.rb"}}
        declared_type :template
        cookbook_name "push-jobs"
        mode "0755"
      end

      Template Context:
      -----------------
      on line #3
        1: #!/bin/sh
        2: exec 2>&1
        3: exec <%= PushJobsHelper.linux_install_path(@options['node']) %>/bin/<%= PushJobsHelper.linux_exec_name(@options['node']) %> -l <%= @options['logging_level'] %> <% if @options['config'] -%> -c <%= @options['config'] %> <% end -%>

Version 2.4.2 of the cookbook works. The breaking change looks to be caused by the refactoring between tags v2.4.2 and v2.5.0

markan commented 8 years ago

PR #63 should fix this