[PUP-6364] On AIX, an already installed package is not updated when using "ensure => latest" Created: 2016/05/26  Updated: 2017/09/14  Resolved: 2017/09/01

Status: Closed
Project: Puppet
Component/s: Types and Providers
Affects Version/s: PUP 4.5.0
Fix Version/s: PUP 5.2.0

Type: Bug Priority: Major
Reporter: Geoff Nichols Assignee: Unassigned
Resolution: Fixed Votes: 2
Labels: aix-parity, client-onboarding, manage-package
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to PUP-7899 acceptance: Update aix package test t... Closed
Template:
Epic Link: Package Type/Provider Improvements
Team: Platform OS
Story Points: 3
Sprint: Platform OS 2017-09-05
Release Notes: Bug Fix
Release Notes Summary: On AIX, packages that are already installed will now update to the latest version when using {{ensure => latest}}.
QA Risk Assessment: Automate

 Description   

On AIX (reported on 7.1 TL3 SP5), when using "ensure => latest" on a package, puppet does not install the latest version available if the package (in this case, an older version) is already installed. If specifying a version number (i.e. 6.0.0.5), the package is updated to this version.

Below is a sample output of the command puppet uses to produce a list of packages and their version numbers:

#/usr/sbin/installp -L -d .
EMC:EMC.CELERRA.aix.rte:6.0.0.5::I:C:::::b:EMC CELERRA AIX Support Software::::0::
EMC:EMC.CELERRA.iscsi.rte:6.0.0.5::I:C:::::b:EMC CELERRA iSCSI Support Software::::0::
EMC:EMC.CLARiiON.aix.rte:6.0.0.5::I:C:::::b:EMC CLARiiON AIX Support Software::::0::
EMC:EMC.CLARiiON.fcp.MPIO.rte:6.0.0.5::I:C:::::b:EMC CLARiiON FCP MPIO Support Software::::0::
EMC:EMC.CLARiiON.fcp.rte:6.0.0.5::I:T:::::b:EMC CLARiiON FCP Support Software::::0::
EMC:EMC.CLARiiON.iscsi.rte:6.0.0.5::I:C:::::b:EMC CLARiiON iSCSI Support Software::::0::
EMC:EMC.INVISTA.aix.rte:6.0.0.5::I:C:::::b:EMC INVISTA AIX Support Software::::0::
EMC:EMC.INVISTA.fcp.MPIO.rte:6.0.0.5::I:C:::::b:EMC INVISTA FCP MPIO Support Software::::0::
EMC:EMC.INVISTA.fcp.rte:6.0.0.5::I:T:::::b:EMC INVISTA FCP Support Software::::0::
EMC:EMC.Symmetrix.aix.rte:6.0.0.5::I:C:::::b:EMC Symmetrix AIX Support Software::::0::
EMC:EMC.Symmetrix.fcp.MPIO.rte:6.0.0.5::I:T:::::b:EMC Symmetrix FCP MPIO Support Software::::0::
EMC:EMC.Symmetrix.fcp.rte:6.0.0.5::I:T:::::b:EMC Symmetrix FCP Support Software::::0::
EMC:EMC.Symmetrix.iscsi.rte:6.0.0.5::I:T:::::b:EMC Symmetrix iSCSI Support Software::::0::
EMC:EMC.XtremIO.aix.rte:6.0.0.5::I:T:::::b:EMC XtremIO AIX Support Software::::0::
EMC:EMC.XtremIO.fcp.MPIO.rte:6.0.0.5::I:T:::::b:EMC XtremIO FCP MPIO Support Software::::0::
EMC:EMC.XtremIO.fcp.rte:6.0.0.5::I:T:::::b:EMC XtremIO FCP Support Software::::0::

So the version available to install is 6.0.0.5, version 6.0.0.3 is currently installed, but the newer version is not installed when using ensure => latest. When specifying 6.0.0.5 as the version, the package is updated.



 Comments   
Comment by Geoff Nichols [ 2016/06/01 ]

Based some initial investigation, this might fix the issue:

diff --git a/lib/puppet/provider/package/aix.rb b/lib/puppet/provider/package/aix.rb
index ae54962..3c57a53 100644
--- a/lib/puppet/provider/package/aix.rb
+++ b/lib/puppet/provider/package/aix.rb
@@ -63,7 +63,7 @@ Puppet::Type.type(:package).provide :aix, :parent => Puppet::Provider::Package d
 
     packages.each do |name, package|
       if info = updates[package[:name]]
-        package.provider.latest_info = info[0]
+        package.provider.latest_info = info
       end
     end
   end

Comment by William Hopper [ 2016/06/29 ]

We should investigate whether this is broken in the same way on older versions of AIX.

Comment by John Boero [ 2017/01/26 ]

Is there any plan to actually finish this or just keep pushing back to the
next sprint? At this point it may as well be closed...

On Wed, Jan 25, 2017 at 6:44 PM, Geoff Nichols (JIRA) <


John Boero
Technical Solution Engineer
jboero@puppet.com

Comment by Scott Pruzinsky [ 2017/06/28 ]

Sorry, I accidentally clicked on "Needs Information", which switched this ticket's status. I put it back to Ready for Engineering (its prior state).

Comment by Geoff Nichols [ 2017/08/28 ]

Merged to puppet#master at https://github.com/puppetlabs/puppet/commit/1c6a39b697496689d8908a153cf4af12d2216cc4.

Comment by John Duarte [ 2017/09/01 ]

Manually validated on AIX 6.1 using pre-release puppet-agent at SHA 796a4c66f3afb736fc1f77cce5ca9ff30586ec6e containing puppet at SHA 8a6d5192a9365b6f712bddcd1671f219217a19aa.

This fix has been confirmed to be included in the 5.2.x branch.

Updates to the corresponding acceptance test will be filed as an additional ticket.

 # cat /opt/puppetlabs/puppet/VERSION
5.1.0.103.g796a4c6
 
 # installp -L -d /tmp/aix-packages-15686/
sudo:sudo.rte:1.7.10.4::I:C:::::N:Configurable super-user privileges runtime::::0::
sudo:sudo.rte:1.8.6.4::I:T:::::N:Configurable super-user privileges runtime::::0::
 
# lslpp -qLc sudo.rte
sudo:sudo.rte:1.7.10.4: : :C: :Configurable super-user privileges runtime: : : : : : :0:0:/:
 
# /opt/puppetlabs/bin/puppet apply -e "package { 'sudo.rte': ensure => 'latest', provider => aix, source => '/tmp/aix-packages-15686' }"
Notice: Compiled catalog for pe-aix-61-ci-acceptance.delivery.puppetlabs.net in environment production in 5.41 seconds
Notice: /Stage[main]/Main/Package[sudo.rte]/ensure: ensure changed '1.7.10.4' to '1.8.6.4'
Notice: Applied catalog in 3.69 seconds
 
# lslpp -qLc sudo.rte
sudo:sudo.rte:1.8.6.4: : :C: :Configurable super-user privileges runtime: : : : : : :0:0:/:

Comment by Kenn Hussey [ 2017/09/04 ]

Scott McClellan please provide release notes for this issue, if needed. Thanks!

Comment by Scott McClellan [ 2017/09/05 ]

Kenn Hussey I've added a note to the ticket.

Generated at Sat Dec 07 22:19:58 PST 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.