Adrian Casajús
2011-Aug-26 15:13 UTC
[Puppet Users] Custom provider works only immediately after sync
Hi all, I''ve got a custom type with a single custom provider. I''ve got enabled pluginsync in both client and server. When I run the puppet agent in the client it syncs the type and the provider and properly executes them. But if I execute the agent again it will tell me err: Could not run Puppet configuration client: Could not find a default provider for passwduser If I go to the server and modify a single line just to trigger the sync and execute the agent again, it properly syncs the modification and runs properly the provider. Then if I run again it goes back to no default provider. Any hints? tips? I''ve looked at the docs and the mailing list and haven''t found anything similar. Thanks for any hint. Cheers, Adri -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Stefan Schulte
2011-Aug-26 22:21 UTC
Re: [Puppet Users] Custom provider works only immediately after sync
On Fri, Aug 26, 2011 at 08:13:03AM -0700, Adrian Casajús wrote:> Hi all, > > I''ve got a custom type with a single custom provider. I''ve got > enabled pluginsync in both client and server. When I run the puppet > agent in the client it syncs the type and the provider and properly > executes them. But if I execute the agent again it will tell me > > err: Could not run Puppet configuration client: Could not find a > default provider for passwduser > > If I go to the server and modify a single line just to trigger the > sync and execute the agent again, it properly syncs the modification > and runs properly the provider. Then if I run again it goes back to no > default provider. > > Any hints? tips? I''ve looked at the docs and the mailing list and > haven''t found anything similar. > > Thanks for any hint. > > Cheers, > AdriBoth files are .rb Files? I just know that when puppet syncs plugins, it will load them no matter what they are (READMEs, helper scripts that are not written in ruby, etc) while on a normal puppetrun puppet will just load the ruby code. -Stefan
Adrian Casajús
2011-Aug-28 11:01 UTC
Re: [Puppet Users] Custom provider works only immediately after sync
Hi, Thanks for the tip. I''ll try that out on monday :) Cheers, Adri On 27 August 2011 00:21, Stefan Schulte <stefan.schulte@taunusstein.net> wrote:> On Fri, Aug 26, 2011 at 08:13:03AM -0700, Adrian Casajús wrote: >> Hi all, >> >> I''ve got a custom type with a single custom provider. I''ve got >> enabled pluginsync in both client and server. When I run the puppet >> agent in the client it syncs the type and the provider and properly >> executes them. But if I execute the agent again it will tell me >> >> err: Could not run Puppet configuration client: Could not find a >> default provider for passwduser >> >> If I go to the server and modify a single line just to trigger the >> sync and execute the agent again, it properly syncs the modification >> and runs properly the provider. Then if I run again it goes back to no >> default provider. >> >> Any hints? tips? I''ve looked at the docs and the mailing list and >> haven''t found anything similar. >> >> Thanks for any hint. >> >> Cheers, >> Adri > > Both files are .rb Files? I just know that when puppet syncs plugins, it > will load them no matter what they are (READMEs, helper scripts that are > not written in ruby, etc) while on a normal puppetrun puppet will just > load the ruby code. > > -Stefan >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Adrian Casajús
2011-Aug-28 11:16 UTC
Re: [Puppet Users] Custom provider works only immediately after sync
Hi again, I just checked and both files are rb files: /etc/puppet/modules/users/lib/puppet $ find . ./provider ./provider/passwdparser.rb ./type ./type/passwduser.rb The passwduser type seems to be properly loaded each time but the passwdparser provider doesn''t. Cheers, Adri On 28 August 2011 13:01, Adrian Casajús <adria@ecm.ub.es> wrote:> Hi, > > Thanks for the tip. I''ll try that out on monday :) > > Cheers, > Adri > > On 27 August 2011 00:21, Stefan Schulte <stefan.schulte@taunusstein.net> wrote: >> On Fri, Aug 26, 2011 at 08:13:03AM -0700, Adrian Casajús wrote: >>> Hi all, >>> >>> I''ve got a custom type with a single custom provider. I''ve got >>> enabled pluginsync in both client and server. When I run the puppet >>> agent in the client it syncs the type and the provider and properly >>> executes them. But if I execute the agent again it will tell me >>> >>> err: Could not run Puppet configuration client: Could not find a >>> default provider for passwduser >>> >>> If I go to the server and modify a single line just to trigger the >>> sync and execute the agent again, it properly syncs the modification >>> and runs properly the provider. Then if I run again it goes back to no >>> default provider. >>> >>> Any hints? tips? I''ve looked at the docs and the mailing list and >>> haven''t found anything similar. >>> >>> Thanks for any hint. >>> >>> Cheers, >>> Adri >> >> Both files are .rb Files? I just know that when puppet syncs plugins, it >> will load them no matter what they are (READMEs, helper scripts that are >> not written in ruby, etc) while on a normal puppetrun puppet will just >> load the ruby code. >> >> -Stefan >> >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Stefan Schulte
2011-Aug-28 20:29 UTC
Re: [Puppet Users] Custom provider works only immediately after sync
On Sun, Aug 28, 2011 at 01:16:25PM +0200, Adrian Casajús wrote:> Hi again, > > I just checked and both files are rb files: > > /etc/puppet/modules/users/lib/puppet $ find . > ./provider > ./provider/passwdparser.rb > ./type > ./type/passwduser.rb > > > The passwduser type seems to be properly loaded each time but the > passwdparser provider doesn''t. > > Cheers, > Adri >The directory structure should read [1] type/<type>.rb provider/<type>/<provider>.rb so in your case it should be lib/puppet/type/passwduser.rb lib/puppet/provider/passwduser/passwdparser.rb Let me know if it is working now. [1] http://docs.puppetlabs.com/guides/plugins_in_modules.html#module-structure-for-025x-and-later -Stefan
Adrian Casajús
2011-Aug-29 10:28 UTC
Re: [Puppet Users] Custom provider works only immediately after sync
Hi, Thanks! It worked. I clearly overlooked that bit. Cheers, Adri On 28 August 2011 22:29, Stefan Schulte <stefan.schulte@taunusstein.net> wrote:> On Sun, Aug 28, 2011 at 01:16:25PM +0200, Adrian Casajús wrote: >> Hi again, >> >> I just checked and both files are rb files: >> >> /etc/puppet/modules/users/lib/puppet $ find . >> ./provider >> ./provider/passwdparser.rb >> ./type >> ./type/passwduser.rb >> >> >> The passwduser type seems to be properly loaded each time but the >> passwdparser provider doesn''t. >> >> Cheers, >> Adri >> > > The directory structure should read [1] > > type/<type>.rb > provider/<type>/<provider>.rb > > so in your case it should be > > lib/puppet/type/passwduser.rb > lib/puppet/provider/passwduser/passwdparser.rb > > Let me know if it is working now. > > > [1] http://docs.puppetlabs.com/guides/plugins_in_modules.html#module-structure-for-025x-and-later > > -Stefan >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.