Issue #4756 has been updated by James Turnbull.

Assignee set to Jesse Wolfe

Reverthing this change causes:

<pre>
1)
Puppet::Error in 'Puppet::Type::Service when validating attribute values should 
not allow setting the :enable parameter if the provider is missing the 
:enableable feature'
Parameter enable failed: undefined method `value=' for nil:NilClass
./spec/unit/type/service_spec.rb:87:in `new'
./spec/unit/type/service_spec.rb:87:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:21:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:16:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:16:in
 `run'

2)
Puppet::Error in 'Puppet::Type::User when user has roles should autorequire 
roles'
Parameter roles failed: undefined method `value=' for nil:NilClass
./spec/unit/type/user_spec.rb:267:
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:21:in
 `run'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:16:in
 `each'
/home/james/src/puppet/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb:16:in
 `run'
</pre>

and 

<pre>

 9) Error:
test_newattr_and_required_features(TestTypeAttributes):
Puppet::Error: Parameter one failed: undefined method `value=' for nil:NilClass
    /home/james/src/puppet/lib/puppet/type.rb:415:in `[]='
    /home/james/src/puppet/lib/puppet/type.rb:1758:in `set_parameters'
    /home/james/src/puppet/lib/puppet/type.rb:1752:in `each'
    /home/james/src/puppet/lib/puppet/type.rb:1752:in `set_parameters'
    /home/james/src/puppet/lib/puppet/type.rb:1734:in `initialize'
    ./ral/manager/attributes.rb:217:in `new'
    ./ral/manager/attributes.rb:217:in `test_newattr_and_required_features'
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 
`each_with_index'
    ./ral/manager/attributes.rb:216:in `each'
    ./ral/manager/attributes.rb:216:in `each_with_index'
    ./ral/manager/attributes.rb:216:in `test_newattr_and_required_features'
    
/usr/lib/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in
 `__send__'
    
/usr/lib/ruby/gems/1.8/gems/mocha-0.9.8/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in
 `run'
</pre>
----------------------------------------
Bug #4756: Providers no longer respect missing features
http://projects.puppetlabs.com/issues/4756

Author: Nick Lewis
Status: Accepted
Priority: High
Assignee: Jesse Wolfe
Category: provider
Target version: 2.6.1
Affected version: 2.6.1rc4
Keywords: 
Branch: 


I'm testing on FreeBSD, which does not have the manages_passwords feature. The 
following manifest attempts to set the password, despite not actually knowing 
how.

<pre>
user { "testuser":
  ensure => present,
  password => anything,
}
</pre>

On 0.25.x, this gives a message like "info: /User[testuser]: Provider pw does 
not support features manages_passwords; not managing attribute password".

This is only an issue for cases where a feature is required for a property to 
exist at all. The case where only certain values of the property depend on a 
feature (eg. ensure => "1.2.3" for packages requires versionable) still works.

This appears to have been introduced in 
commit:e5478d4ff0510e637ecec69f8b2fc7ef844ba5c0.


-- 
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 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