Axel Bock
2012-Sep-27 15:19 UTC
[Puppet Users] custom type in ruby - "invalid resource type at .../site.pp"
Hi readers, I have developed a custom SVN type (based on http://is.gd/W0cIMS among others), and I guess it''s fairly correct ruby code. (at least I don''t get any syntax errors). now I have deployed it in my module in <module>/lib/puppet/type/repo_checkout.rb and <module>/lib/puppet/provider/repo_checkout/svn.rb, and the files do get transferred to the client. in my site.pp I do the following: repo_checkout { "test" : source => "svn://l1214022/puppet/trunk/bas3_bali", method => "export", path => "/home/rsync/puppet/checkthis", } ... and I get the following error: err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type repo_checkout at /etc/puppet/manifests/site.pp:98 on node ... If I insert print statements in the code and invoke puppet agent --debug, I see the statements being executed on the client: (provider) info: Loading downloaded plugin /home/rsync/.puppet/var/lib/puppet/provider/repo_checkout/svn.rb Huhu debug: Reloading svn repo_checkout provider Huhu debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson (type) info: Loading downloaded plugin /home/rsync/.puppet/var/lib/puppet/type/repo_checkout.rb lala Huhudebug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson Does anybody have an idea what I do wrong? Thanks in advance & greetings, Axel. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/CSwVZe_4gXUJ. 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.
Axel Bock
2012-Sep-27 15:21 UTC
[Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
p.s.: my type can be seen here: http://pastebin.com/20N8teKV and the provider here: http://pastebin.com/SjqyWegu thanks, axel. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/g71mFRFXSmYJ. 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.
Jakov Sosic
2012-Sep-27 19:36 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
On 09/27/2012 05:21 PM, Axel Bock wrote:> p.s.: my type can be seen here: http://pastebin.com/20N8teKV > and the provider here: http://pastebin.com/SjqyWeguTry commenting out whole "sync_direction" property section in your type type definition file. You defined property but you don''t have methods in your provider... Also make sure you are doing the pluginsync on the client. -- 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.
Axel Bock
2012-Sep-28 06:15 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
plugincheck on client: check. commented out property: check. unfortunately same result :( thanks, axel. Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic:> > On 09/27/2012 05:21 PM, Axel Bock wrote: > > p.s.: my type can be seen here: http://pastebin.com/20N8teKV > > and the provider here: http://pastebin.com/SjqyWegu > > Try commenting out whole "sync_direction" property section in your type > type definition file. You defined property but you don''t have methods in > your provider... > > Also make sure you are doing the pluginsync on the client. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/3AX5jkheeaAJ. 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.
Axel Bock
2012-Sep-28 12:44 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
Okay, I am one step farther. After seeing "Invalid resource" for about 100 times I symlinked the type and provider dirs to /var/.../puppet/ (the global, core putty installation files). I basically wanted to see if I have an invalid ruby file, or if puppet simply doesn''t notice the downloaded plugins. It turns out - the latter. in the global puppet dir I get no more "Invalid type" errors, and my debug print statement in the exists? method gets printed. Now - what do I have to do to make puppet realize that this stupid plugin is there? It _does_ even autoload it - if I change it I get a diff printed, the code gets executed (I see print statements I put in there) - but once the type shall be acutally used puppet chickens out. This is so extremely annoying. Pluginsync = true is activated in the [main] and [master] section of client and master. Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES 11 SP2 repo. thanks in advance & greetings! Axel. Am Freitag, 28. September 2012 08:15:14 UTC+2 schrieb Axel Bock:> > plugincheck on client: check. > commented out property: check. > > unfortunately same result :( > > thanks, > axel. > > > Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic: >> >> On 09/27/2012 05:21 PM, Axel Bock wrote: >> > p.s.: my type can be seen here: http://pastebin.com/20N8teKV >> > and the provider here: http://pastebin.com/SjqyWegu >> >> Try commenting out whole "sync_direction" property section in your type >> type definition file. You defined property but you don''t have methods in >> your provider... >> >> Also make sure you are doing the pluginsync on the client. >> >> >>-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/28aheY-ZZS8J. 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.
Trevor Vaughan
2012-Sep-28 13:18 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
I''m assuming that you did this, but did you restart your master after finishing the plugin? I''ve forgotten to do this on occasion which amounted in a few minutes of frustration. Good luck, Trevor On Fri, Sep 28, 2012 at 8:44 AM, Axel Bock <axel.bock@arbeitsagentur.de> wrote:> Okay, I am one step farther. > > After seeing "Invalid resource" for about 100 times I symlinked the type and > provider dirs to /var/.../puppet/ (the global, core putty installation > files). > I basically wanted to see if I have an invalid ruby file, or if puppet > simply doesn''t notice the downloaded plugins. > > It turns out - the latter. in the global puppet dir I get no more "Invalid > type" errors, and my debug print statement in the exists? method gets > printed. > > Now - what do I have to do to make puppet realize that this stupid plugin is > there? It _does_ even autoload it - if I change it I get a diff printed, the > code gets executed (I see print statements I put in there) - but once the > type shall be acutally used puppet chickens out. This is so extremely > annoying. > > Pluginsync = true is activated in the [main] and [master] section of client > and master. > > > Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES 11 > SP2 repo. > > > thanks in advance & greetings! > Axel. > > > > Am Freitag, 28. September 2012 08:15:14 UTC+2 schrieb Axel Bock: >> >> plugincheck on client: check. >> commented out property: check. >> >> unfortunately same result :( >> >> thanks, >> axel. >> >> >> Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic: >>> >>> On 09/27/2012 05:21 PM, Axel Bock wrote: >>> > p.s.: my type can be seen here: http://pastebin.com/20N8teKV >>> > and the provider here: http://pastebin.com/SjqyWegu >>> >>> Try commenting out whole "sync_direction" property section in your type >>> type definition file. You defined property but you don''t have methods in >>> your provider... >>> >>> Also make sure you are doing the pluginsync on the client. >>> >>> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/28aheY-ZZS8J. > > 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.-- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaughan@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- 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.
Axel Bock
2012-Oct-01 13:28 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
multiple times ... I had these few minutes of frustration before, too ;) thanks, axel. Am Freitag, 28. September 2012 15:18:07 UTC+2 schrieb Trevor Vaughan:> > I''m assuming that you did this, but did you restart your master after > finishing the plugin? > > I''ve forgotten to do this on occasion which amounted in a few minutes > of frustration. > > Good luck, > > Trevor > > On Fri, Sep 28, 2012 at 8:44 AM, Axel Bock <axel...@arbeitsagentur.de<javascript:>> > wrote: > > Okay, I am one step farther. > > > > After seeing "Invalid resource" for about 100 times I symlinked the type > and > > provider dirs to /var/.../puppet/ (the global, core putty installation > > files). > > I basically wanted to see if I have an invalid ruby file, or if puppet > > simply doesn''t notice the downloaded plugins. > > > > It turns out - the latter. in the global puppet dir I get no more > "Invalid > > type" errors, and my debug print statement in the exists? method gets > > printed. > > > > Now - what do I have to do to make puppet realize that this stupid > plugin is > > there? It _does_ even autoload it - if I change it I get a diff printed, > the > > code gets executed (I see print statements I put in there) - but once > the > > type shall be acutally used puppet chickens out. This is so extremely > > annoying. > > > > Pluginsync = true is activated in the [main] and [master] section of > client > > and master. > > > > > > Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES > 11 > > SP2 repo. > > > > > > thanks in advance & greetings! > > Axel. > > > > > > > > Am Freitag, 28. September 2012 08:15:14 UTC+2 schrieb Axel Bock: > >> > >> plugincheck on client: check. > >> commented out property: check. > >> > >> unfortunately same result :( > >> > >> thanks, > >> axel. > >> > >> > >> Am Donnerstag, 27. September 2012 21:37:02 UTC+2 schrieb Jakov Sosic: > >>> > >>> On 09/27/2012 05:21 PM, Axel Bock wrote: > >>> > p.s.: my type can be seen here: http://pastebin.com/20N8teKV > >>> > and the provider here: http://pastebin.com/SjqyWegu > >>> > >>> Try commenting out whole "sync_direction" property section in your > type > >>> type definition file. You defined property but you don''t have methods > in > >>> your provider... > >>> > >>> Also make sure you are doing the pluginsync on the client. > >>> > >>> > > -- > > You received this message because you are subscribed to the Google > Groups > > "Puppet Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/puppet-users/-/28aheY-ZZS8J. > > > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > To unsubscribe from this group, send email to > > puppet-users...@googlegroups.com <javascript:>. > > For more options, visit this group at > > http://groups.google.com/group/puppet-users?hl=en. > > > > -- > Trevor Vaughan > Vice President, Onyx Point, Inc > (410) 541-6699 > tvau...@onyxpoint.com <javascript:> > > -- This account not approved for unencrypted proprietary information -- >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/VCzN4obcvAAJ. 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.
jcbollinger
2012-Oct-01 13:31 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
On Friday, September 28, 2012 7:44:02 AM UTC-5, Axel Bock wrote:> > Okay, I am one step farther. > > After seeing "Invalid resource" for about 100 times I symlinked the type > and provider dirs to /var/.../puppet/ (the global, core putty installation > files). > I basically wanted to see if I have an invalid ruby file, or if puppet > simply doesn''t notice the downloaded plugins. > > It turns out - the latter. in the global puppet dir I get no more "Invalid > type" errors, and my debug print statement in the exists? method gets > printed. > > Now - what do I have to do to make puppet realize that this stupid plugin > is there? It _does_ even autoload it - if I change it I get a diff printed, > the code gets executed (I see print statements I put in there) - but once > the type shall be acutally used puppet chickens out. This is so extremely > annoying. > > Pluginsync = true is activated in the [main] and [master] section of > client and master. > > > Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES 11 > SP2 repo. > >> >>>This is standard behavior. The master does not load types or providers directly from modules. If it is its own client then it will sync them to itself when the agent runs, or else you can copy them into position manually. Under some circumstances you will need to restart the master after the type and provider are synced, though I thought that was mostly when you modify an existing type / provider. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Iojb7yC_FfgJ. 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.
Axel Bock
2012-Oct-02 06:37 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
Hi John, now you really have me confused. I have a module with a custom type. Now I have a client (it should not matter whether it''s the same machine or not, right?). I followed the steps of the puppet documentation (http://is.gd/3Bkzsx). Now I expect the type to be synched (which it is) and used on the "client side" (which it is not). I also checked with a different client btw, same result. When you''re saying "standard behavior" - which part do you mean exactly? And in all seriousness - manually copying the files in place cannot really be the way to go here. Thanks! Axel. Am Montag, 1. Oktober 2012 15:31:10 UTC+2 schrieb jcbollinger:> > > > On Friday, September 28, 2012 7:44:02 AM UTC-5, Axel Bock wrote: >> >> Okay, I am one step farther. >> >> After seeing "Invalid resource" for about 100 times I symlinked the type >> and provider dirs to /var/.../puppet/ (the global, core putty installation >> files). >> I basically wanted to see if I have an invalid ruby file, or if puppet >> simply doesn''t notice the downloaded plugins. >> >> It turns out - the latter. in the global puppet dir I get no more >> "Invalid type" errors, and my debug print statement in the exists? method >> gets printed. >> >> Now - what do I have to do to make puppet realize that this stupid plugin >> is there? It _does_ even autoload it - if I change it I get a diff printed, >> the code gets executed (I see print statements I put in there) - but once >> the type shall be acutally used puppet chickens out. This is so extremely >> annoying. >> >> Pluginsync = true is activated in the [main] and [master] section of >> client and master. >> >> >> Does nobody have any idea? I am using puppet 2.6.17 from the SuSE SLES 11 >> SP2 repo. >> >>> >>>> > This is standard behavior. The master does not load types or providers > directly from modules. If it is its own client then it will sync them to > itself when the agent runs, or else you can copy them into position > manually. Under some circumstances you will need to restart the master > after the type and provider are synced, though I thought that was mostly > when you modify an existing type / provider. > > > John > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/u7UKF7Aw5hgJ. 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.
Jakov Sosic
2012-Nov-10 14:27 UTC
Re: [Puppet Users] Re: custom type in ruby - "invalid resource type at .../site.pp"
On 10/02/2012 08:37 AM, Axel Bock wrote:> Hi John, now you really have me confused. > > I have a module with a custom type. Now I have a client (it should not > matter whether it''s the same machine or not, right?). I followed the > steps of the puppet documentation (http://is.gd/3Bkzsx). Now I expect > the type to be synched (which it is) and used on the "client side" > (which it is not). I also checked with a different client btw, same result. > > When you''re saying "standard behavior" - which part do you mean exactly? > And in all seriousness - manually copying the files in place cannot > really be the way to go here.Just create empty node definition for the master itself, and run puppet agent -t --pluginsync on master. Eventually you may need to restart puppetmaster after that, and that''s it. -- Jakov Sosic www.srce.unizg.hr -- 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.