Issue #13397 has been updated by Chris Price.

File 13397.pp added

I am able to reproduce this, but I believe that it may just be a formatting 
issue.  I've attached a manifest file which just looks like this:

    package { 'god':
        name     => 'god',
        ensure   => '0.12.0',
        provider => 'gem',
    }  

Here's a console session where I'm making sure that I have two *other* versions 
of this gem installed, but not the one specified in the manifest.

    **cprice@localhost 12:10:52 ~/scratch $** gem uninstall god

    Select gem to uninstall:
    1. god-0.11.0
    2. god-0.12.0
    3. god-0.12.1
    4. All versions
    > 4
    Successfully uninstalled god-0.11.0
    Successfully uninstalled god-0.12.0
    Remove executables:
            god

    in addition to the gem? [Yn]  y
    Removing god
    Successfully uninstalled god-0.12.1
    **cprice@localhost 12:10:59 ~/scratch $** gem install god -v 0.11.0
    Fetching: god-0.11.0.gem (100%)
    Building native extensions.  This could take a while...
    Successfully installed god-0.11.0
    1 gem installed
    *...*

    **cprice@localhost 12:11:34 ~/scratch $** gem install god -v 0.12.1
    Fetching: god-0.12.1.gem (100%)
    Building native extensions.  This could take a while...
    Successfully installed god-0.12.1
    1 gem installed
    *...*
    **cprice@localhost 12:11:43 ~/scratch $** gem list

    *** LOCAL GEMS ***

    *...*
    god (0.12.1, 0.11.0)
    *...*

    **cprice@localhost 12:11:45 ~/scratch $** puppet apply --verbose ./13397.pp 
    info: Applying configuration version '1333048402'
    notice: /Stage[main]//Package[god]/ensure: ensure changed '0.12.10.11.0' to 
'0.12.0'
    notice: Finished catalog run in 1.42 seconds
    **cprice@localhost 12:13:24 ~/scratch $** gem list

    *** LOCAL GEMS ***

    *...*
    god (0.12.1, 0.12.0, 0.11.0)
    *...*
    **cprice@localhost 12:13:27 ~/scratch $**
  
So, my take-away is that it appears to have installed the correct version of 
the gem successfully... it just chose some unusual formatting for the output 
message.
----------------------------------------
Bug #13397: Puppet 2.7.12 not handling multiple versions of installed gems 
properly
https://projects.puppetlabs.com/issues/13397#change-58843

Author: Wade Minter
Status: Investigating
Priority: Normal
Assignee: Chris Price
Category: 
Target version: 
Affected Puppet version: 2.7.12
Keywords: array, ruby, gems
Branch: 


I just upgraded from Puppet 2.7.9 to 2.7.12, and am seeing something odd with 
regards to gem management.

On our systems, we have multiple versions of gems installed:

    root@resque2:~# gem search -l libshadow
    *** LOCAL GEMS ***
    libshadow (1.0.0, 0.0.2)
    root@resque2:~# gem search -l god
    *** LOCAL GEMS ***
    god (0.12.1, 0.12.0, 0.11.0)
    
However, when puppet runs, it appears to be concatenating the array of all of 
those versions together to build a string when comparing the installed versions 
to the desired target version:

    root@resque2:~# puppet agent --test
    info: Caching catalog for resque2.teamsnap.com
    info: Applying configuration version '1332685435'
    notice: /Stage[main]//Package[libshadow]/ensure: ensure changed 
'1.0.00.0.2' to '1.0.0'
    notice: /Stage[main]/Teamsnap_resque_worker::Package/Package[god]/ensure: 
ensure changed '0.12.10.12.00.11.0' to '0.12.1'
    notice: Finished catalog run in 12.35 seconds
    
This seems to be incorrect behavior.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to