Jira (PUP-9934) AIX user resource fails

20 views
Skip to first unread message

Vladimir Vassyukov (JIRA)

unread,
Aug 1, 2019, 12:38:03 AM8/1/19
to puppe...@googlegroups.com
Vladimir Vassyukov created an issue
 
Puppet / Bug PUP-9934
AIX user resource fails
Issue Type: Bug Bug
Affects Versions: PUP 6.5.0
Assignee: Unassigned
Created: 2019/07/31 9:37 PM
Environment:

root@nes-t1a-app6> [~]# oslevel -s
7100-05-03-1846
root@nes-t1a-app6> [~]# uname -a
AIX nes-t1a-app6 1 7 00F7040C4C00

Debug: Executing: '/bin/chpasswd -e -c oracle'
Error: undefined local variable or method `param' for User[oracle](provider=aix):Puppet::Type::User::ProviderAix
Error: /Stage[main]/Aix::Oracleuser/User[oracle]/password: change from [old password hash redacted] to [new password hash redacted] failed: undefined local variable or method `param' for User[oracle](provider=aix):Puppet::Type::User::ProviderAix

Priority: Major Major
Reporter: Vladimir Vassyukov

An error occurs using parameter "password" module "users". I find the bug report PUP-8538, it describes the same issue, and it marked as fixed in version PUP 4.10.11, PUP 5.3.6, PUP 5.5.1, but i get the error in version 6.5.0

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Vladimir Vassyukov (JIRA)

unread,
Aug 1, 2019, 11:08:02 PM8/1/19
to puppe...@googlegroups.com
Vladimir Vassyukov updated an issue
Change By: Vladimir Vassyukov
Environment: root@nes-t1a-app6> [~]# oslevel -s
7100-05-03-1846
root@nes-t1a-app6> [~]# uname -a
AIX nes-t1a-app6 1 7 00F7040C4C00

Debug: Executing: '/bin/chpasswd -e -c oracle'
Error: undefined local variable or method `param' for User[oracle](provider=aix):Puppet::Type::User::ProviderAix
Error: /Stage[main]/Aix::Oracleuser/User[oracle]/password: change from [old password hash redacted] to [new password hash redacted] failed: undefined local variable or method `param' for User[oracle](provider=aix):Puppet::Type::User::ProviderAix
 
An error occurs using parameter "password" module "users". I find the bug report PUP-8538, it describes the same issue, and it marked as fixed in version PUP 4.10.11, PUP 5.3.6, PUP 5.5.1, but i get the error in version 6.5.0

Debug: Executing: '/bin/chpasswd -e -c oracle'
Error: undefined local variable or method `param' for User[oracle](provider=aix):Puppet::Type::User::ProviderAix
Error: /Stage[main]/Aix::Oracleuser/User[oracle]/password: change from [old password hash redacted] to [new password hash redacted] failed: undefined local variable or method `param' for User[oracle](provider=aix):Puppet::Type::User::ProviderAix

Jorie Tappa (JIRA)

unread,
Aug 5, 2019, 12:52:03 PM8/5/19
to puppe...@googlegroups.com
Jorie Tappa updated an issue
Change By: Jorie Tappa
Team: Night's Watch

Mihai Buzgau (JIRA)

unread,
Sep 2, 2019, 1:57:03 AM9/2/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage

Mihai Buzgau (JIRA)

unread,
Sep 4, 2019, 5:55:03 AM9/4/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR NW - Triage 2019-09-18

Mihai Buzgau (JIRA)

unread,
Sep 4, 2019, 7:39:03 AM9/4/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Story Points: 5

Gabriel Nagy (JIRA)

unread,
Sep 6, 2019, 7:45:03 AM9/6/19
to puppe...@googlegroups.com
Gabriel Nagy assigned an issue to Gabriel Nagy
Change By: Gabriel Nagy
Assignee: Gabriel Nagy

Gabriel Nagy (JIRA)

unread,
Sep 6, 2019, 10:12:03 AM9/6/19
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug PUP-9934
 
Re: AIX user resource fails

Hi,

I can't reproduce this with Puppet 6.5.0 under AIX 7.2 with oslevel 7200-00-02-1614 and manifest:

user { 'test':
ensure => present,
name => 'test',
password => 'encryptedpassword',
}

Info: Applying configuration version '1567778749'
Debug: Executing: '/usr/sbin/lsuser -c test'
Debug: Executing: '/usr/sbin/lsgroup -c -a id ALL'
Debug: Executing: '/bin/chpasswd -e -c'
Notice: /Stage[main]/Main/User[test]/password: changed [redacted] to [redacted]
Debug: /User[test]: The container Class[Main] will propagate my refresh event
Debug: Class[Main]: The container Stage[main] will propagate my refresh event
Debug: Finishing transaction 413940320
Debug: Storing state
Debug: Pruned old state cache entries in 0.00 seconds
Debug: Stored state in 0.01 seconds
Notice: Applied catalog in 0.19 seconds
Debug: Applying settings catalog for sections reporting, metrics
Debug: Finishing transaction 410003010
Debug: Received report to process from aix72-2.delivery.puppetlabs.net
Debug: Processing report from aix72-2.delivery.puppetlabs.net with processor Puppet::Reports::Store
[0] [AIX] root@aix72-2:~ # puppet --version
6.5.0

Can you share more details, such as:

  • what are the contents of the user resource in the manifest you're trying to apply
  • what's on line 218 in the following file: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/aix.rb

Thanks!

Vladimir Vassyukov (JIRA)

unread,
Sep 8, 2019, 11:12:03 PM9/8/19
to puppe...@googlegroups.com

New versions of AIX have changed the behavior of the chpasswd command to report errors when the command syntax is incorrect. See the links below.

http://www-01.ibm.com/support/docview.wss?uid=isg1IV95055
http://www-01.ibm.com/support/docview.wss?uid=isg1IJ04629

The change to behavior went into 7100-05-01-1731 and 7200-02-01-1731, so setting the password in these AIX versions will fail. This will also cause new user creations to fail on these SPs.

The issue is that in https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/user/aix.rb#L279 we use chpasswd -e -c username, where as the username is not a valid option to the command. Since the behavior change, customers have seen failures in the user resources on these new SPs.

We are using AIX 7100-05-03-1846, please update AIX in your test envoronment and try reproduce again.

Gabriel Nagy (JIRA)

unread,
Sep 9, 2019, 4:03:03 AM9/9/19
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug PUP-9934

Hi,

I understand your concerns, however you have not addressed my questions. The change in the chpasswd command was merged into Puppet 4.10: https://github.com/puppetlabs/puppet/commit/ee982cf532f1a253426b7e76f2352f9ce77af61e, so it's technically impossible to have Puppet 6.5.0 executing the chpasswd command with the user parameter, since the code is not there anymore. The AIX version is irrelevant here, as we do not differentiate our code based on that. That's why I requested more information, such as the contents of the /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/user/aix.rb file.

I'm guessing what's happening here is either:

  • the agent version on the affected systems does not include the previously mentioned fix (puppet version is not 6.5.0)
  • an upgrade was done on the affected systems, from a version without the fix to a version with the fix, which ended badly, so puppet --version reports 6.5.0 but the behavior does not reflect this; in which case, please reinstall puppet-agent on the target systems
  • the puppet/provider/user/aix.rb file has been manually tampered with (this is extremely unlikely, but still a possibility)

I'm afraid that without more information I don't know how to help with this.

 

Vladimir Vassyukov (JIRA)

unread,
Sep 9, 2019, 5:57:03 AM9/9/19
to puppe...@googlegroups.com

Hi! I ran my manifest and it succeeds. Since opening ticket we installed some updates, maybe the error I encountered was fixed in them. Thanks for the help! The ticket can be closed.

Gabriel Nagy (JIRA)

unread,
Sep 9, 2019, 6:08:03 AM9/9/19
to puppe...@googlegroups.com
Gabriel Nagy commented on Bug PUP-9934

Great to know, we'll close this then!

Reply all
Reply to author
Forward
0 new messages