Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-7241

AIX - Errors when parsing lsuser output with special characters (#!)


    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      AIX, PE 2016.4.0+

    • QA Risk Assessment:
      Needs Assessment


      When attempting to manage a user on AIX, the puppet agent runs fail with the following error.

      Error: /User[username]: Could not evaluate: undefined method `to_sym' for nil:NilClass

      The problem is occurring when the attributes have an odd number of colons in the output of lsuser -c.

      Reproduction Steps

      This can be reproduced with following these steps:
      1. Login to the AIX node with an IPv6 address
      2. Run the puppet agent

      Technical details

      The host_last_login from lsuser -c -R files username contains : characters, which are not parsed properly since it is a colon seperated list. This fails in <https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/aixobject.rb#L199>. A IPv6 address of the form 2001:0db8:85a3:0000:0000:8a2e:0370:7334 will need to have the : escaped to fit into a colon separated list. Since the regex does not account for these escaped characters, the property list has more values than keys (i.e 8a2e would be a value without a key).

      Proposed fix
      Use lsuser -f instead of lsuser -c to output a list of attribute pairs instead of a colon list, as it should automatically use parse_attr_list instead. Since lsuser -f will not have to escape the colons, this issue should no longer be seen.


          Issue Links



              • Assignee:
                rod Rodney Treweek
              • Votes:
                0 Vote for this issue
                5 Start watching this issue


                • Created:

                  Zendesk Support