Issue #7770 has been updated by jared jennings.
I was using noop (dummy) providers, as I found suggested in #2384. Using 2.7.18, not only did I get warnings about multiple default providers, but worse, Puppet would choose the dummy about half the time, unpredictably. But the fix for #6907 appears to have made it so I no longer need the dummy providers. ---------------------------------------- Bug #7770: warning: Found multiple default providers https://projects.puppetlabs.com/issues/7770#change-72371 Author: Adam Gandelman Status: Accepted Priority: Normal Assignee: Dan Bode Category: agent Target version: Affected Puppet version: 2.6.4 Keywords: Branch: Using a noop provider to work around suitability checks for commands from yet-to-be installed packages, causes a warning about multiple providers during runs when the package is actually installed. If the package is not installed before the run, there are no warnings and the package is later installed. <pre> # lib/puppet/type/nova_admin.rb Puppet::Type.newtype(:nova_admin) do @doc = "Manage createion/deletion of nova admin users." ensurable newparam(:name) do desc "The name of the admins." end end </pre> <pre> # lib/puppet/provider/nova_admin/default.pp Puppet::Type.type(:nova_admin).provide(:default) do desc "This is a default provider that does nothing. This allows us to install nova-manage on the same puppet run where we want to use it." def create return false end def destroy return false end def exists? fail('This is just the default provider for nova_admin, all it does is fail') end end </pre> <pre> # lib/puppet/provider/nova_admin/nova_admin.pp Puppet::Type.type(:nova_admin).provide(:admin) do desc "Manage nova admin user " commands :nova_manage => 'nova-manage' def exists? nova_manage("user", "list").match(/^#{resource[:name]}$/) end def create nova_manage("user", "admin", resource[:name]) end def destroy nova_manage("user", "delete", resource[:name]) end end </pre> <pre> # admin.pp class nova::manage::admin ( $username ) { nova_admin{ $username: ensure => present, provider => 'admin', notify => Exec["nova-db-sync"], require => Class["nova::db"], } } </pre> <pre> warning: Found multiple default providers for nova_admin: admin, default; using admin </pre> -- 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.
