On Tuesday, February 25, 2014 4:07:06 AM UTC-6, Jose Luis Ledesma wrote:
>
> Hi,
>
>    I have found a problem trying to upgrade a rhel6 package (libcgroup), 
> the current version installed is:
>
> libcgroup-0.37-7.el6.x86_64
>
>    And I want to install this version:
>
> libcgroup-0.37-7.2.el6_4.x86_64
>
>    So I created a class that states:
>
>                 package { 'libcgroup':
>                   ensure => '0.37-7.2.el6_4',
>                 }
>
>   But when I run puppet agent -t :
>
> Error: Could not update: Failed to update to version 0.37-7.2.el6_4, got 
> version 0.37-7.el6 instead
> Error: /Stage[main]/Checks::Linux::Libcgroup/Package[libcgroup]/ensure: 
> change from 0.37-7.el6 to 0.37-7.2.el6_4 failed: Could not update: Failed 
> to update to version 0.37-7.2.el6_4, got version 0.37-7.el6 instead
>
>
>    When I run the debug yum tries to downgrade the package:
>
> Debug: Package[libcgroup](provider=yum): Downgrading package libcgroup 
> from version 0.37-7.el6 to 0.37-7.2.el6_4
> Debug: Executing '/usr/bin/yum -d 0 -e 0 -y downgrade 
> libcgroup-0.37-7.2.el6_4'
>
>    And obviously this package exists on the repo:
>
>
> # yum install libcgroup-0.37-7.2.el6_4
> Loaded plugins: product-id, security, subscription-manager
> This system is not registered to Red Hat Subscription Management. You can 
> use subscription-manager to register.
> Setting up Install Process
> Resolving Dependencies
> --> Running transaction check
> ---> Package libcgroup.x86_64 0:0.37-7.el6 will be updated
> --> Processing Dependency: libcgroup = 0.37-7.el6 for package: 
> libcgroup-devel-0.37-7.el6.x86_64
> ---> Package libcgroup.x86_64 0:0.37-7.2.el6_4 will be an update
> --> Running transaction check
> ---> Package libcgroup-devel.x86_64 0:0.37-7.el6 will be updated
> ---> Package libcgroup-devel.x86_64 0:0.37-7.2.el6_4 will be an update
> --> Finished Dependency Resolution
>
> Dependencies Resolved
>
>
> =============================================================================================================================================
>  Package                               Arch                         
> Version                                 Repository                  Size
>
> =============================================================================================================================================
> Updating:
>  libcgroup                             x86_64                       
> 0.37-7.2.el6_4                          rhel                       111 k
> Updating for dependencies:
>  libcgroup-devel                       x86_64                       
> 0.37-7.2.el6_4                          rhel                        35 k
>
> Transaction Summary
>
> =============================================================================================================================================
> Upgrade       2 Package(s)
>
>
> If I set "ensure => latest" in the package definition it works.
>
> any hint?
>


This looks like a Puppet bug (probably 
https://tickets.puppetlabs.com/browse/PUP-682, or at least related to 
that).  Note in particular that Puppet thinks it needs to *down*grade the 
installed package version, and that it issues a yum command appropriate for 
that purpose.  Yum understands RPM version-release codes differently than 
Puppet seems to do, and recognizes the specified package version as an 
update, which it therefore refuses to apply as a downgrade.  In the end, 
the original package remains installed.

Per comments in JIRA, work addressing the general issue is being performed 
in the context of https://tickets.puppetlabs.com/browse/PUP-1244.  You 
could consider commenting on the issue.

In the meantime, your best workaround is probably to ensure 'latest'.  If 
you have your nodes pointed at an internal repository (which I would 
recommend in any case) then you can control what version is available for 
installation be controlling what packages are in that repository.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/d69f1082-3622-4e99-aa4d-02673974cb3b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to