Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5594

Yum provider raises exception if check-update returns unexpected exit code

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • PUP 4.3.2
    • None
    • 1
    • Client 2015-12-16
    • Bug Fix
    • Previously the yum provider would raise an exception if check-update returned an unexpected error code. This behavior was unintended, it now correctly issues a warning and continues.

    Description

      Installing PE 2015.2.3 on an AWS instance without internet access fails to install the console successfully.

      The yum package provider calls `yum check-update`, and the command returns a non-zero exit code. The package provider tries to emit a warning, but calls a private method in doing so. This causes an exception to be raised and the resource to fail.

      [2015-11-19 16:52:16.287 UTC] INFO Error: Could not get latest version: private method `warn' called for Puppet::Type::Package::ProviderYum:Class
      [2015-11-19 16:52:16.287 UTC] INFO Error: /Stage[main]/Pe_nginx/Package[pe-nginx]/ensure: change from 1.8.0-9.pe.el7 to latest failed: Could not get latest version: private method `warn' called for Puppet::Type::Package::ProviderYum:Class
      

      Steps to workaround the issue:
      1. Run installer
      2. Modifed /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb:83, commenting out the `warn` directive
      3. Proceed with installation in GUI

      This is probably a trivial fix to the yum provider: update it to emit a warn correctly without raising an exception.

      Attachments

        Activity

          People

            Unassigned Unassigned
            reid Reid Vandewiele
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support