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

-Stefan

Attachment: pgpNAguEfLQOp.pgp
Description: PGP signature

Reply via email to