mdsol/mesos_cookbook

mesos:repo fails when run second time

Closed this issue · 2 comments

I am not sure if this relates to mesos cookbook code, but, when I run mesos::repo second time on my environment ( first run is fine) I get this:


   * remote_file[mesos-rpm-yum] action create (up to date)
   * rpm_package[mesos-rpm-yum] action install

     ================================================================================
     Error executing action `install` on resource 'rpm_package[mesos-rpm-yum]'
     ================================================================================

     Chef::Exceptions::Exec
     ----------------------
     rpm  -U /var/chef/cache/mesosphere-el-repo.noarch.rpm returned 2, expected 0

     Cookbook Trace:
     ---------------
     /var/chef/cache/cookbooks/mesos/recipes/repo.rb:47:in `block in from_file'
     /var/chef/cache/cookbooks/mesos/recipes/repo.rb:35:in `from_file'
     /var/chef/cache/cookbooks/mesos/recipes/install.rb:27:in `from_file'
     /var/chef/cache/cookbooks/mesos/recipes/master.rb:24:in `from_file'

     Resource Declaration:
     ---------------------
     # In /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-sugar-3.1.1/lib/chef/sugar/filters.rb

      17:           resource = @recipe.send(m, *args, &block)
      18:

     Compiled Resource:
     ------------------
     # Declared in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-sugar-3.1.1/lib/chef/sugar/filters.rb:17:in `method_missing'

     rpm_package("mesos-rpm-yum") do
       provider Chef::Provider::Package::Rpm
       action [:nothing]
       retries 0
       retry_delay 2
       guard_interpreter :default
       package_name "mesos-rpm-yum"
       source "/var/chef/cache/mesosphere-el-repo.noarch.rpm"
       version "6-2"
       timeout 900
       cookbook_name "mesos"
       recipe_name "repo"
     end

When run rpm manually on target host I get this:

$ rpm  -U /var/chef/cache/mesosphere-el-repo.noarch.rpm
        package mesosphere-el-repo-6-3.noarch (which is newer than mesosphere-el-repo-6-2.noarch) is already installed

I got an idea. yum update running in my recipe update mesos to latest version (6.3)

BTW, why do you freeze version for mesos?