Issue #22048 has been updated by Dustin Mitchell.
resources {
'user':
purge => true;
}
leads to (with --trace)
Error: /Stage[main]//Resources[user]: Failed to generate additional
resources using 'generate': comparison of String with 500 failed
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/type/resources.rb:125:in `>'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/type/resources.rb:125:in `user_check'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/type/resources.rb:71:in `check'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/type/resources.rb:90:in `block in generate'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/type/resources.rb:88:in `select'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/type/resources.rb:88:in `generate'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:202:in
`generate_additional_resources'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:222:in
`block in add_dynamically_generated_resources'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:222:in
`each'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:222:in
`add_dynamically_generated_resources'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/transaction.rb:94:in
`evaluate'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/resource/catalog.rb:144:in `apply'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:122:in
`block in apply_catalog'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:179:in `block
in benchmark'
c:/Program Files/Puppet
Labs/Puppet/sys/ruby/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:178:in
`benchmark'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:121:in
`apply_catalog'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:179:in
`run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in `block
(5 levels) in run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent/locker.rb:20:in
`lock'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in `block
(4 levels) in run'
c:/Program Files/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.9.1/sync.rb:227:in
`sync_synchronize'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:45:in `block
(3 levels) in run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:119:in
`with_client'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:42:in `block
(2 levels) in run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:84:in
`run_in_fork'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:41:in `block
in run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:179:in
`call'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:179:in
`controlled_run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:39:in `run'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/application/agent.rb:353:in `onetime'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/application/agent.rb:327:in `run_command'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:364:in
`block (2 levels) in run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:456:in
`plugin_hook'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:364:in
`block in run'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:504:in
`exit_on_fail'
c:/Program Files/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:364:in
`run'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/util/command_line.rb:132:in `run'
c:/Program Files/Puppet
Labs/Puppet/puppet/lib/puppet/util/command_line.rb:86:in `execute'
c:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'
Because the final comparison in
# Make sure we don't purge users below a certain uid, if the check
# is enabled.
def user_check(resource)
return true unless self[:name] == "user"
return true unless self[:unless_system_user]
resource[:audit] = :uid
return false if system_users.include?(resource[:name])
current_values = resource.retrieve_resource
current_values[resource.property(:uid)] > self[:unless_system_user]
end
assumes that uid is an integer. It's not on Windows.
I should be able to write a patch for this soon.
----------------------------------------
Bug #22048: Managing user resources on Windows fails
https://projects.puppetlabs.com/issues/22048#change-95896
* Author: Dustin Mitchell
* Status: Unreviewed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* Affected Puppet version:
* Keywords:
* Branch:
----------------------------------------
--
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://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.