Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

cookbook stop working after yum upgrade #144

Description

@binlialfie

in centos 7, the cookbook works fine initially, mesos-1.1.0-2.0.107.centos701406 installed

in the second chef-client, mesos-1.1.0-2.0.107.centos701406 upgrade to mesos-1.2.0-2.0.6 as expected after yum update happens somewhere.

however, the following error occurs for the next chef-client

Recipe: mesos::install
  * yum_package[unzip] action install (up to date)
  * yum_package[libcurl] action install (up to date)
  * yum_package[subversion] action install (up to date)
  * yum_package[mesos] action install

    ================================================================================
    Error executing action `install` on resource 'yum_package[mesos]'
    ================================================================================

    Chef::Exceptions::Package
    -------------------------
    Installed package mesos-1.2.0-2.0.6 is newer than candidate package mesos-1.1.0-2.0.107.centos701406

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/mesos/recipes/install.rb

     54:   yum_package 'mesos' do
     55:     version lazy {
     56:       # get the version-release string directly from the Yum provider rpmdb
     57:       Chef::Provider::Package::Yum::YumCache
     58:         .instance.instance_variable_get('@rpmdb').lookup('mesos')
     59:         .find { |pkg| pkg.version.v == node['mesos']['version'] }
     60:         .version.to_s
     61:     }
     62:   end
     63: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/mesos/recipes/install.rb:54:in `from_file'

    yum_package("mesos") do
      package_name "mesos"
      action [:install]
      default_guard_interpreter :default
      declared_type :yum_package
      cookbook_name "mesos"
      recipe_name "install"
      version "1.1.0-2.0.107.centos701406"
    end

    System Info:
    ------------
    chef_version=13.0.118
    platform=centos
    platform_version=7.3.1611
    ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
    program_name=chef-client worker: ppid=30621;start=14:45:03;
    executable=/opt/chef/bin/chef-client


Running handlers:
[2017-05-03T14:45:24+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-05-03T14:45:24+00:00] ERROR: Exception handlers complete
Chef Client failed. 16 resources updated in 20 seconds
[2017-05-03T14:45:24+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-05-03T14:45:24+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-05-03T14:45:24+00:00] ERROR: yum_package[mesos] (mesos::install line 54) had an error: Chef::Exceptions::Package: Installed package mesos-1.2.0-2.0.6 is newer than candidate package mesos-1.1.0-2.0.107.centos701406
[2017-05-03T14:45:24+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions