The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #7596

Solaris user_attr addition returns error in noop for new entries in /etc/user_attr

Added by John Warburton about 3 years ago. Updated about 3 years ago.

Status:AcceptedStart date:05/19/2011
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version:2.6.4 Branch:
Keywords:solaris user_attr

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

We use the user resource to modify user attributes (Solaris RBAC) entries in /etc/user_attr

When running noop against a user who has no entries in /etc/user_attr, a noop run reports an error rather than an action that needs to happen. The change applies successfully

I do get a slightly different eror message between 2.6.4 and 2.6.8

root@lumdar# ruby --version
ruby 1.8.7 (2010-01-10 patchlevel 249) [sparc-solaris2.10]

root@lumdar# cat /var/tmp/user_attr.pp
user {warbjoh:
    keys => 'defaultpriv=basic,proc_owner,file_dac_read',
}
root@lumdar# grep warbjoh /etc/user_attr

2.6.4

root@lumdar# puppet --version
2.6.4
root@lumdar# puppet apply --verbose --noop /var/tmp/user_attr.pp
info: Applying configuration version '1305868044'
err: /Stage[main]//User[warbjoh]: Could not evaluate: private method `select' called for :absent:Symbol

2.6.8

root@lumdar# puppet --version
2.6.8
root@lumdar# puppet apply --verbose --noop /var/tmp/user_attr.pp
info: Applying configuration version '1305867979'
err: /Stage[main]//User[warbjoh]: Could not evaluate: Puppet::Util::Log requires a message
notice: Finished catalog run in 0.09 seconds

Apply the change

root@lumdar# puppet apply --verbose /var/tmp/user_attr.pp
info: Applying configuration version '1305868455'
notice: /Stage[main]//User[warbjoh]/keys: defined 'keys' as 'defaultpriv=basic,proc_owner,file_dac_read'

root@lumdar# puppet apply --verbose --noop /var/tmp/user_attr.pp
info: Applying configuration version '1305868551'

If there is a user entry in /etc/user_attr, the noop performs correctly

root@lumdar# grep warbjoh /etc/user_attr
warbjoh::::type=normal;defaultpriv=basic

root@lumdar# puppet apply --verbose --noop /var/tmp/user_attr.pp
info: Applying configuration version '1305868665'
notice: /Stage[main]//User[warbjoh]/keys: is defaultpriv=basic, should be defaultpriv=basic,proc_owner,file_dac_read (noop)

History

#1 Updated by Ben Hughes about 3 years ago

  • Status changed from Unreviewed to Accepted

Thank you for the concise report.

Also available in: Atom PDF