Issue #10915 has been updated by James Turnbull.
Josh Cooper wrote:
> Yes, I agree. The `call_provider` method should check if the provider
> `respond_to?` the method rather than blindly catching a NoMethodError.
Totally this just caught me. I changed the method to:
<pre>
def call_provider(value)
begin
provider.send(self.class.name.to_s + "=", value)
rescue NoMethodError => e
self.fail "The %s provider can not handle attribute %s [Exception: %s]" %
[provider.class.name, self.class.name, e.name]ยทยท
end
end
</pre>
That gave me a much better indication of the underlying problem.
----------------------------------------
Bug #10915: The "provider can not handle attribute" error is misleading
https://projects.puppetlabs.com/issues/10915
Author: Michael Bryant
Status: Accepted
Priority: Normal
Assignee:
Category: provider
Target version: 2.7.x
Affected Puppet version: 2.7.6
Keywords: AIX user provider puppet password
Branch:
<pre>
err: /Stage[main]/Root_user/User[root]/password: change from [old password hash
redacted] to [new password hash redacted]
failed: The aix provider can not handle attribute password at
/etc/puppet/modules/root_user/manifests/init.pp:35
</pre>
A cursory look at the source shows that the aix user provider has the feature
manages_passwords, but doesn't have the password attribute listed as being
managed
config:
user { "root":
ensure => "present",
uid => "0",
gid => "system",
comment => "Super-User",
home => "/",
shell => "/usr/bin/ksh",
password => 'REDACTED'
}
--
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.