|
Based on observations in
PUP-7139
, when a user provides values to attributes of a resource where the provider doesn't support the required features, there is a debug message raised and the action is unsuccessful.
Because the action fails, this should be something that is visible to a user. As such, I'm proposing that the log level of the below be raised to error:
https://github.com/puppetlabs/puppet/blob/6c5b7043896977e51587df815bd8c9dbb071ace3/lib/puppet/type.rb#L771
To replicate this behaviour, use the below (I ran it on a CentOS 6 VM):
puppet apply -e 'group { "myspecialgroup": members => ['chad'], ensure => present, provider => groupadd }' --noop --debug
|
This results in the following log:
Debug: Caching environment 'production' (ttl = 0 sec)
|
Notice: Compiled catalog for centos6a.pdx.puppet.vm in environment production in 0.09 seconds
|
Debug: /Group[myspecialgroup]: Provider groupadd does not support features manages_members; not managing attribute members
|
Debug: Creating default schedules
|
Debug: Loaded state in 0.02 seconds
|
Debug: Loaded state in 0.04 seconds
|
Debug: Loaded transaction store file in 0.00 seconds
|
Info: Applying configuration version '1495533119'
|
Notice: /Stage[main]/Main/Group[myspecialgroup]/ensure: current_value absent, should be present (noop)
|
Debug: /Group[myspecialgroup]: The container Class[Main] will propagate my refresh event
|
Notice: Class[Main]: Would have triggered 'refresh' from 1 events
|
Debug: Class[Main]: The container Stage[main] will propagate my refresh event
|
Notice: Stage[main]: Would have triggered 'refresh' from 1 events
|
Debug: Finishing transaction 39288460
|
Debug: Storing state
|
Debug: Stored state in 0.03 seconds
|
Notice: Applied catalog in 0.08 seconds
|
As the target state is never reached, puppet should notify the user that there has been a failure in an error message.
|