Testing/feedback on Yum provider improvements


#1

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations

Matthew Kent | http://magoazul.com


#2

Looking for testers!

---------- Forwarded message ----------
From: Matthew Kent mkent+chef-dev@magoazul.com
Date: Wed, May 11, 2011 at 12:17 AM
Subject: Testing/feedback on Yum provider improvements
To: chef-dev@lists.opscode.com

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations


#3

Ok, served as a good excuse to make sure my process for building a new
chef server from scratch was working. Got a test server up. Going to
apply your patches and see if I can do some stuff with it. We don’t
have many known working cookbooks yet so I won’t be able to do too
much interesting stuff with it, but I can at least run some cookbooks
that install packages w/ yum and will let you know if anything
explodes.

KC

On Wed, May 11, 2011 at 8:18 AM, Matthew Kent
mkent+chef-users@magoazul.com wrote:

Looking for testers!

---------- Forwarded message ----------
From: Matthew Kent mkent+chef-dev@magoazul.com
Date: Wed, May 11, 2011 at 12:17 AM
Subject: Testing/feedback on Yum provider improvements
To: chef-dev@lists.opscode.com

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

https://github.com/mdkent/chef/commits/yum-improvements

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations


#4

We have a Opscode Platform customer who encountered an issue with yum
selecting an out of date package. That appears to have been resolved by the
changes to yum-dump… See
http://help.opscode.com/discussions/problems/542-yum-provider-attempts-to-downgrade-package-despite-action-upgradefor
the data.

Tom Thomas | Director of Program Management | Opscode
tom@opscode.com | © 206.234.1193 | www.opscode.com

On Wed, May 11, 2011 at 8:18 AM, Matthew Kent <mkent+chef-users@magoazul.com

wrote:

Looking for testers!

---------- Forwarded message ----------
From: Matthew Kent mkent+chef-dev@magoazul.com
Date: Wed, May 11, 2011 at 12:17 AM
Subject: Testing/feedback on Yum provider improvements
To: chef-dev@lists.opscode.com

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

https://github.com/mdkent/chef/commits/yum-improvements

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output
    options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations


#5

On Wed, May 11, 2011 at 5:10 PM, Tom Thomas tom@opscode.com wrote:

We have a Opscode Platform customer who encountered an issue with yum
selecting an out of date package. That appears to have been resolved by the
changes to yum-dump…

I duplicated this users configuration and it seems to work as I would
expect using mkent’s yum-improvements branch.

I also exercised yum_package a little with architecture, something
we’ve had issues around in the past. This worked great as well.

Great work Matthew! Looking forward to merging it in and closing the
slew of tickets.

Bryan


#6
  • Applied updates to noted files on a fresh 0.10.0 gem installed
    server on RHEL 5.6.
  • Bootstrapped a RHEL 5.6 client box and ran some cookbooks on it. No
    problems to report. Didn’t do much that’s particularly wild w/
    packages. Mostly standard package definitions in recipes that’ll be
    handled by yum like:

package “perl-Date-Calc” do
action :install
end

package “perl-HTML-CalendarMonthSimple” do
action :install
end

package “sudo” do
action :upgrade
end

#remove default apache if installed
package “httpd” do
action :remove
end

#now install custom apache
package “apache-httpd” do
action :install
end

package “java-1.4.2-gcj-compat” do
action :remove
end

package “sun-jdk-1.6” do
action :install
version node[‘java’][‘version’]
end

KC

On Wed, May 11, 2011 at 4:42 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

Ok, served as a good excuse to make sure my process for building a new
chef server from scratch was working. Got a test server up. Going to
apply your patches and see if I can do some stuff with it. We don’t
have many known working cookbooks yet so I won’t be able to do too
much interesting stuff with it, but I can at least run some cookbooks
that install packages w/ yum and will let you know if anything
explodes.

KC

On Wed, May 11, 2011 at 8:18 AM, Matthew Kent
mkent+chef-users@magoazul.com wrote:

Looking for testers!

---------- Forwarded message ----------
From: Matthew Kent mkent+chef-dev@magoazul.com
Date: Wed, May 11, 2011 at 12:17 AM
Subject: Testing/feedback on Yum provider improvements
To: chef-dev@lists.opscode.com

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

https://github.com/mdkent/chef/commits/yum-improvements

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations


#7

On Wed, May 11, 2011 at 7:08 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

  • Applied updates to noted files on a fresh 0.10.0 gem installed
    server on RHEL 5.6.
  • Bootstrapped a RHEL 5.6 client box and ran some cookbooks on it. No
    problems to report. Didn’t do much that’s particularly wild w/
    packages. Mostly standard package definitions in recipes that’ll be

Awesome! Thanks for trying it out guys.

  • mk

#8

In related work, if anyone is interested, I’ve added support to
yum_package for matching rpm ‘Provides’. This can be used to install
packages in some interesting ways, see

http://tickets.opscode.com/browse/CHEF-2096

would love any testing or feedback.

On Thu, May 12, 2011 at 11:18 AM, Matthew Kent
mkent+chef-users@magoazul.com wrote:

On Wed, May 11, 2011 at 7:08 PM, KC Braunschweig
kcbraunschweig@gmail.com wrote:

  • Applied updates to noted files on a fresh 0.10.0 gem installed
    server on RHEL 5.6.
  • Bootstrapped a RHEL 5.6 client box and ran some cookbooks on it. No
    problems to report. Didn’t do much that’s particularly wild w/
    packages. Mostly standard package definitions in recipes that’ll be

Awesome! Thanks for trying it out guys.

  • mk

#9

finally got around to being able to test this. the one issue i ran into is an exception being thrown when i am trying to enforce the removal of a package and that package isn’t on the system (i.e. the desired sate)

package “badpackage” do
action :remove
end

i will get an exception:
Yum installed and available lists don’t have a version of package badpackage-1.2.3

easy to just ignore failures, and i actually believe this is also the behavior in 0.9.x (tho not certain cause i’ve been running my own hacked yum provider).
seems to me there should be a check to see if the action was remove or not, and ignore that its not available if it was asked to be removed.

On May 11, 2011, at 8:18 AM, Matthew Kent wrote:

Looking for testers!

---------- Forwarded message ----------
From: Matthew Kent mkent+chef-dev@magoazul.com
Date: Wed, May 11, 2011 at 12:17 AM
Subject: Testing/feedback on Yum provider improvements
To: chef-dev@lists.opscode.com

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

https://github.com/mdkent/chef/commits/yum-improvements

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations


#10

On Wed, Jun 15, 2011 at 3:49 PM, Jesse Nelson spheromak@gmail.com wrote:

finally got around to being able to test this. the one issue i ran into is an exception being thrown when i am trying to enforce the removal of a package and that package isn’t on the system (i.e. the desired sate)

package “badpackage” do
action :remove
end

i will get an exception:
Yum installed and available lists don’t have a version of package badpackage-1.2.3

easy to just ignore failures, and i actually believe this is also the behavior in 0.9.x (tho not certain cause i’ve been running my own hacked yum provider).
seems to me there should be a check to see if the action was remove or not, and ignore that its not available if it was asked to be removed.

Yes! Thanks! Somehow I missed this. I’ll get a ticket in and a fix up tomorrow.

I also noticed another bug with :remove and the ‘Provides’ resolution
I added as part of this ticket

http://tickets.opscode.com/browse/CHEF-2096

Right now it would needlessly get triggered for removed packages. So
thanks again :slight_smile:

On May 11, 2011, at 8:18 AM, Matthew Kent wrote:

Looking for testers!

---------- Forwarded message ----------
From: Matthew Kent mkent+chef-dev@magoazul.com
Date: Wed, May 11, 2011 at 12:17 AM
Subject: Testing/feedback on Yum provider improvements
To: chef-dev@lists.opscode.com

Hello!

I’ve been working quite heavily on the Yum provider in 0.10 over the
past couple weeks and have reached a point where I’m looking for some
testing and feedback. The branch is at

https://github.com/mdkent/chef/commits/yum-improvements

For testing purposes the extent of the changes are confined to

chef/lib/chef/monkey_patches/numeric.rb
chef/lib/chef/monkey_patches/string.rb
chef/lib/chef/provider/package/yum-dump.py
chef/lib/chef/provider/package/yum.rb
chef/lib/chef/resource/yum_package.rb

If anyone has a spare server and time to copy those overtop of an
existing gem install of 0.10 and give their cookbooks a whirl I’d be
very appreciative.

As for the changes, notable yum_package improvements include:

  • YumCache speed improvements when installing/upgrading/removing
    multiple packages - now only the installed packages are refreshed
    after each action during a Chef client run. Also, data is now loaded
    on demand - getting rid of a useless cache refresh at the end of the
    Chef client run.
  • Ability to flush the YumCache via a flush_cache [ :before, :after ]
    attribute that will dump the cache before the current resource is
    loaded and/or after a package is installed/upgraded/removed. This is
    for users installing yum repositories as packages.
  • Ability to downgrade packages via a allow_downgrade true/false
    attribute that will, if necessary based on the candidate and installed
    versions, allow a call to ‘yum downgrade’ rather than ‘yum install’ to
    successfully complete the install.
  • Ability to pass the package arch in the package_name like
    "strace.i386" (‘yum list’ outputs package names like this)
  • Improved error handling in parsing yum-dump.py output and package
    version handling. We ensure that the version to install is actually
    newer than the installed version.
  • Nearly rewritten yum-dump.py with improved error handling and output options.
  • Added some RPM related utility classes used in the improvements and
    useful for future work.
  • A whole ton of unit tests to cover (hopefully) all of the work,
    including the fun to test YumCache itself.

Ticket fix list:

CHEF-1287: speed up yum provider
CHEF-1245: Yum package provider fails poorly when it encounters
unexpected output from yum-dump.py
CHEF-1063: yum query/yum-dump.py fails when a locally-compiled Python
is in $PATH
CHEF-2272: yum-dump.py - commas are valid in package names
CHEF-2280: general yum-dump.py improvements
CHEF-311: yum provider - better cache refresh
CHEF-2283: yum/rpm providers - rpm version handling
CHEF-1819: Chef isn’t recognizing yum .x86_64 syntax
CHEF-2085: YumCache needs unit tests
CHEF-2301: general yum provider improvements
CHEF-2330: yum provider - allow flushing of cache
CHEF-1790: Modify package/yum.rb upgrade_package to support
"downgrade" in certain situations


#11

On Wed, Jun 15, 2011 at 11:25 PM, Matthew Kent
mkent+chef-users@magoazul.com wrote:

On Wed, Jun 15, 2011 at 3:49 PM, Jesse Nelson spheromak@gmail.com wrote:

finally got around to being able to test this. the one issue i ran into is an exception being thrown when i am trying to enforce the removal of a package and that package isn’t on the system (i.e. the desired sate)

package “badpackage” do
action :remove
end

i will get an exception:
Yum installed and available lists don’t have a version of package badpackage-1.2.3

easy to just ignore failures, and i actually believe this is also the behavior in 0.9.x (tho not certain cause i’ve been running my own hacked yum provider).
seems to me there should be a check to see if the action was remove or not, and ignore that its not available if it was asked to be removed.

Yes! Thanks! Somehow I missed this. I’ll get a ticket in and a fix up tomorrow.

I also noticed another bug with :remove and the ‘Provides’ resolution
I added as part of this ticket

http://tickets.opscode.com/browse/CHEF-2096

Right now it would needlessly get triggered for removed packages. So
thanks again :slight_smile:

Thanks to some feedback on IRC I’ve corrected a couple bugs with the
rewritten provider. Anyone looking for the most recent code can find
it in https://github.com/mdkent/chef/commits/CHEF-2429 which includes
fixes from:

Would appreciate any testing as the work, aside from these fixes, was
merged into the upcoming 0.10.2. The list of files from my original
post still applies and can be copied into a 0.9.16 or 0.10.0 install.