Issue #3136 has been reported by Alban Browaeys.
----------------------------------------
Bug #3136: custom plugins "type/" is not loaded first . If provider/* depends
on those if fails to load at load plugins
http://projects.reductivelabs.com/issues/3136
Author: Alban Browaeys
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Affected version: 0.25.4
Keywords:
Branch:
For example error with puppet-mysql:
<pre>
info: Loading downloaded plugin /var/lib/puppet/lib/facter/mysql.rb
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/parser/functions/mysql_password.rb
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/provider/mysql_database/mysql.rb
err: Could not load downloaded file
/var/lib/puppet/lib/puppet/provider/mysql_database/mysql.rb: undefined method
`provide' for nil:NilClass
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/provider/mysql_grant/mysql.rb
err: Could not load downloaded file
/var/lib/puppet/lib/puppet/provider/mysql_grant/mysql.rb: undefined method
`provide' for nil:NilClass
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/provider/mysql_user/mysql.rb
err: Could not load downloaded file
/var/lib/puppet/lib/puppet/provider/mysql_user/mysql.rb: undefined method
`provide' for nil:NilClass
info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/type/mysql_database.rb
info: Loading downloaded plugin /var/lib/puppet/lib/puppet/type/mysql_grant.rb
/var/lib/puppet/lib/puppet/provider/mysql_grant/mysql.rb:14: warning: already
initialized constant MYSQL_USER_PRIVS
/var/lib/puppet/lib/puppet/provider/mysql_grant/mysql.rb:20: warning: already
initialized constant MYSQL_DB_PRIVS
info: Loading downloaded plugin /var/lib/puppet/lib/puppet/type/mysql_user.rb
info: Loading facts in mysql
info: Loading facts in mysql
</pre>
Code that fails is
<pre>
Puppet::Type.type(:mysql_database).provide(:mysql,
:parent => Puppet::Provider::Package) do
desc "Use mysql as database."
</pre>
that is
"info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/type/mysql_database.rb"
which happens after:
"info: Loading downloaded plugin
/var/lib/puppet/lib/puppet/provider/mysql_database/mysql.rb"
even though the provider mysql_database needs it defined beforehand.
Attached is a patch to workaround this by loading (on the client side as its
there that sort happens) puppet://puppet/plugins/puppet/type before all the
others.
Maybe facts should also be up explicitely but right now the default sort
ordering place them on the top already (but this is directory layout dependent).
--
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://reductivelabs.com/redmine/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.