Issue #2050 has been updated by luke.

This is clearly a bug in Puppet, but your configs won't work when I fix that 
bug.  It looks like you've got an array of arrays here, because you're 
specifying the groups as an array, and then you're putting the groups into 
another array as a string:
<pre>
groups => [ "opt-query","opt-arch" ],
...
groups => [ "$groups" ],
</pre>
Those conflict, and you should just have:
<pre>
groups => [ "opt-query","opt-arch" ],
...
groups => $groups,
</pre>

Please try that.
----------------------------------------
Bug #2050: LDAP user in multiple groups causes NoMethodError exception
http://projects.reductivelabs.com/issues/2050

Author: TrevorHemsley
Status: Accepted
Priority: High
Assigned to: luke
Category: LDAP
Target version: 0.24.8
Complexity: Easy
Affected version: 0.24.7
Keywords: 


I am using puppet 0.24.7 on Centos 5.2 and am attempting to set up users in 
LDAP via puppet. I am getting an error msg that says
<pre>
err: Got an uncaught exception of type NoMethodError: undefined method `join' 
for :absent:Symbol
</pre>
on the second run of puppetd. First time through I run
<pre>
puppetd --test --tags users
</pre>
and it works and sets up the users "opt-query" and "opt-arch" in my LDAP 
directory. If I then run the exact same command again then it fails with the 
error above. Here's a simplified test case of what I have set up and it fails 
for me using this. It appears to be something to do with the multiple groups 
specified for the opt-arch user - do I have a mistake in the way I have this 
set up in the define?
<pre>
define ldapuser
        (
        $uid,
        $groups,
        $home,
        $shell
        )
        {
        group {"$title":
                gid => $uid,
                provider => "ldap",
                ensure => present
                }
        user {"$title":
                comment => "$title",
                ensure => present,
                groups => [ "$groups" ],
                gid => "$uid",
                home => "$home",
                managehome => "false",
                provider => "ldap",
                shell => "$shell",
                uid => "$uid",
                require => Group["$title"]
                }
        }

class users
        {
        ldapuser {"opt-query":
                home => "/some/dir/here",
                shell => "/sbin/nologin",
                uid => "506",
                groups => ["opt-query"]
                }
        ldapuser {"opt-arch":
                home => "/some/dir/here",
                shell => "/sbin/nologin",
                uid => "507",
                groups => [ "opt-query","opt-arch" ],
                require => [ Ldapuser["opt-query"] ]
                }
    }
</pre>
Running puppetd with --trace gives me the following stack trace:
<pre>
puppetd --test --noop --tags users --trace
info: Loading fact drbd
info: Retrieving facts
info: Loading fact drbd
warning: Found multiple default providers for group: ldap, groupadd; using ldap
warning: Found multiple default providers for user: ldap, useradd; using ldap
info: Caching catalog at /var/lib/puppet/localconfig.yaml
notice: Starting catalog run
notice: 
//Node[basicnode]/users/Sysusersetup[apache]/Usersetup[apache]/User[apache]/groups:
 is dm-upload, should be dm-upload,opt-query (noop)
notice: //Node[basicnode]/users/Ldapuser[opt-query]/User[opt-query]/gid: is 
605, should be 605 (noop)
notice: //Node[basicnode]/users/Ldapuser[opt-arch]/User[opt-arch]/gid: is 604, 
should be 604 (noop)
/usr/lib/ruby/site_ruby/1.8/puppet/property/list.rb:13:in `is_to_s'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/change.rb:49:in `go'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction/change.rb:72:in `forward'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:118:in `apply_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:111:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:111:in `apply_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:83:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:239:in `eval_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:425:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:424:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:238:in `eval_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:310:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:425:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:424:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:309:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:303:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:303:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/node/catalog.rb:124:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:256:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:180:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:255:in `run'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:237:in `run'
/usr/sbin/puppetd:417
/usr/lib/ruby/site_ruby/1.8/puppet/property/list.rb:13:in `is_to_s'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:124:in `apply_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:111:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:111:in `apply_changes'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:83:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:239:in `eval_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:425:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:424:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:238:in `eval_resource'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:310:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:425:in `thinmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:424:in `thinmark'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:309:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:303:in `collect'
/usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:303:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/puppet/node/catalog.rb:124:in `apply'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:256:in `run'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:180:in `benchmark'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/1.8/benchmark.rb:307:in `realtime'
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:179:in `benchmark'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:255:in `run'
/usr/lib/ruby/1.8/sync.rb:229:in `synchronize'
/usr/lib/ruby/site_ruby/1.8/puppet/network/client/master.rb:237:in `run'
/usr/sbin/puppetd:417
err: Got an uncaught exception of type NoMethodError: undefined method `join' 
for :absent:Symbol
notice: Finished catalog run in 4.96 seconds
</pre>
At this point, puppet is effectively broken until I manually remove those users 
and groups from the LDAP directory and then it will work for one iteration then 
break again :(


----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to