Issue #2050 has been updated by TrevorHemsley.
Probably not the correct fix since Ruby is not a language that I am familiar
with but gets me past the error
--- /usr/lib/ruby/site_ruby/1.8/puppet/property/list.rb 2009-03-05
13:01:57.000000000 +0000
+++ /usr/lib/ruby/site_ruby/1.8/puppet/property/list.new 2009-03-05
13:02:55.000000000 +0000
@@ -10,7 +10,7 @@
end
def is_to_s(currentvalue)
- currentvalue.join(delimiter)
+ currentvalue.join(delimiter) if currentvalue.is_a?(Array)
end
def membership
----------------------------------------
Bug #2050: LDAP user in multiple groups causes NoMethodError exception
http://projects.reductivelabs.com/issues/2050
Author: TrevorHemsley
Status: Accepted
Priority: High
Assigned to:
Category: LDAP
Target version: 0.24.8
Complexity: Unknown
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
err: Got an uncaught exception of type NoMethodError: undefined method `join'
for :absent:Symbol
on the second run of puppetd. First time through I run
puppetd --test --tags users
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?
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"] ]
}
}
Running puppetd with --trace gives me the following stack trace:
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
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
-~----------~----~----~----~------~----~------~--~---