Good Morning! I''m working on implementing the glassfish module from ModuleForge so that we can use a Resource Type in our manifests instead of execs, but am getting an odd error on the client. Glassfish[domain1]: Failed to retrieve current state of resource: No ability to determine if glassfish exists Here is the relevant output from a debug/trace - http://pastie.org/1376256 Provider: glassfish/asadmin.rb - http://pastie.org/1376225 systemproperty/asadmin.rb - http://pastie.org/1376242 Type: type/glassfish.rb - http://pastie.org/1376249 type/systemproperty.rb - http://pastie.org/1376250 Anyone have any ideas? I''m sort of lost as to what the issue is, was hoping someone here might be able to point me in the right direction. Thanks! Justin -- 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.
On 12/14/2010 04:30 PM, Justin Ellis wrote:> Good Morning! > > I''m working on implementing the glassfish module from ModuleForge so > that we can use a Resource Type in our manifests instead of execs, but > am getting an odd error on the client. > > Glassfish[domain1]: Failed to retrieve current state of resource: No > ability to determine if glassfish exists > > Here is the relevant output from a debug/trace - http://pastie.org/1376256 > > Provider: > glassfish/asadmin.rb - http://pastie.org/1376225 > systemproperty/asadmin.rb - http://pastie.org/1376242 > > Type: > type/glassfish.rb - http://pastie.org/1376249 > type/systemproperty.rb - http://pastie.org/1376250 > > Anyone have any ideas? I''m sort of lost as to what the issue is, was > hoping someone here might be able to point me in the right direction.Hi, I have next to no knowledge of ruby, but my guess is that the type is lacking an :exists? method. See lib/puppet/property.rb for reference. HTH, Felix -- 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.
On Tue, Dec 14, 2010 at 09:30:37AM -0600, Justin Ellis wrote:> Good Morning! > > I''m working on implementing the glassfish module from ModuleForge so that we > can use a Resource Type in our manifests instead of execs, but am getting an > odd error on the client. > > Glassfish[domain1]: Failed to retrieve current state of resource: No ability > to determine if glassfish exists > > Here is the relevant output from a debug/trace - http://pastie.org/1376256 > > Provider: > glassfish/asadmin.rb - http://pastie.org/1376225 > > Type: > type/glassfish.rb - http://pastie.org/1376249you did used the right paths? type/glassfish.rb provider/glassfish/asadmin.rb And the command asadmin is present on you machine? My guess is that Puppet cannot find your provider and because there is none, the type cannot call the exists? method on your provider and then tries to use the exists? method of your type. But your type does not have an exists? method (and thats correct) While you can write a type with no provider (the type must do all the retrieve, insync, etc.) you shouldn''t to that. But you have to make sure that your provider gets loaded BTW: You defined portbase, profile etc as parameters. Puppet will not check if these are in sync, if the glassfish domain is already there. Is this intentional? When you want to parse output of a command there already are some helper functions like execpipe in util.rb you can use. You may also want to look in the exectype how the change owner work. I personally dont like su - user in scripts -Stefan
Thanks for the replies! I found the issue earlier and have been busy building out the rest of it, I had a feeling it was something small...turns out it was. The pluginsync = true portion was overwritten and thus the cause of my issues. Thanks! Justin On Tue, Dec 14, 2010 at 12:03 PM, Stefan Schulte < stefan.schulte@taunusstein.net> wrote:> On Tue, Dec 14, 2010 at 09:30:37AM -0600, Justin Ellis wrote: > > Good Morning! > > > > I''m working on implementing the glassfish module from ModuleForge so that > we > > can use a Resource Type in our manifests instead of execs, but am getting > an > > odd error on the client. > > > > Glassfish[domain1]: Failed to retrieve current state of resource: No > ability > > to determine if glassfish exists > > > > Here is the relevant output from a debug/trace - > http://pastie.org/1376256 > > > > Provider: > > glassfish/asadmin.rb - http://pastie.org/1376225 > > > > Type: > > type/glassfish.rb - http://pastie.org/1376249 > > you did used the right paths? > type/glassfish.rb > provider/glassfish/asadmin.rb > > And the command asadmin is present on you machine? My guess is that Puppet > cannot > find your provider and because there is none, the type cannot call the > exists? method on your provider and then tries to use the exists? > method of your type. But your type does not have an exists? method (and > thats correct)> While you can write a type with no provider (the type must do all the > retrieve, > insync, etc.) you shouldn''t to that. But > you have to make sure that your provider gets loaded > > BTW: > You defined portbase, profile etc as parameters. Puppet will not check > if these are in sync, if the glassfish domain is already there. Is this > intentional?> When you want to parse output of a command there already are some helper > functions like execpipe in util.rb you can use. You may also want to look > in the exectype how the change owner work. I personally dont like > su - user in scripts >I agree, it may be worth submitting a patch for this.> > -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.