Bug #6936

AIX user provider fails if a gid is specified instead of a name.

Added by Parker Johnson about 2 years ago. Updated 2 months ago.

Status:ClosedStart date:04/01/2011
Priority:NormalDue date:12/31/2011
Assignee:-% Done:

0%

Category:providerEstimated time:20.00 hours
Target version:3.2.0
Affected Puppet version:development Branch:
Keywords:AIX user provider puppet gid

Description

Several AIX providers (aixobject/user/group) were merged into the code a couple days ago. I just checked out from source and gave it a try on an AIX6.1 TL4 host. Most of it works (thank you! psyched to see puppet and AIX play nice), but if you specify a gid instead of a group name, the manifest errors. See below. I’ll be happy to re-test if yall have a hard time finding an AIX host. :)


[root@sfcloudap001 puppet]# cat modules/test/manifests/init.pp 
class test {

  group{'test_g':
    ensure => present,
    gid => 6969,
  }

  user{'test_u':
    ensure => present,
    uid => 99,
    gid => 6969,
    home => "/tmp/",
  }
}


[root@autobuild /]# puppet agent --test
warning: iconv doesn't seem to support UTF-8/UTF-16 conversions
info: Caching catalog for autobuild.gid.gap.com
info: Applying configuration version '1301604374'
notice: /Stage[main]/Test/Group[test_g]/ensure: created
err: /Stage[main]/Test/User[test_u]/ensure: change from absent to present failed:
Could not set 'present on ensure: undefined method `groupname_by_id' for # at /etc/puppet/modules/test/manifests/init.pp:13
notice: Finished catalog run in 2.89 seconds
[root@autobuild /]# 


Related issues

Related to Puppet - Feature #5432: Use AIX native commands to manage users and groups Closed 12/01/2010

History

#1 Updated by Ben Hughes about 2 years ago

  • Status changed from Unreviewed to Investigating

#2 Updated by Ben Hughes about 2 years ago

  • Status changed from Investigating to Accepted

#3 Updated by Michael Stahnke over 1 year ago

  • Target version changed from 2.6.x to 2.7.x

2.6.x is closed. Moving to 2.7.x

#4 Updated by Nick Bausch about 1 year ago

The issue seems to be around the use of “self” in the context called. When replacing “self.groupname_by_id” with “groupname_by_id”: on the referenced lines in provider/user/aix.rb:

def groupname_by_id(gid)
groupname = groupname_by_id(value)

This seems to make the groupname_by_id available to the calling method, but I have not done much testing.

debug: User[tomcat](provider=aix): Executing '/usr/bin/mkuser home=/opt/tomcat id=523 pgrp=tomcat shell=/bin/bash tomcat'
notice: /Stage[main]//Node[aixengsb302p.prod.ch3.s.com]/User[tomcat]/ensure: created

#5 Updated by Andrew Parker 5 months ago

  • Target version deleted (2.7.x)

#6 Updated by Andrew Parker 5 months ago

As the 2.7.x line is winding down, I am removing the target at 2.7.x from tickets in the system. The 2.7 line should only receive fixes for major problems (crashes, for instance) or security problems.

#7 Updated by Matthaus Owens 2 months ago

  • Status changed from Accepted to Merged - Pending Release

Addressed in commit 64cb36f

#8 Updated by Matthaus Owens 2 months ago

  • Target version set to 3.2.0

#9 Updated by Matthaus Owens 2 months ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 3.2.0-rc1

Also available in: Atom PDF