Hi

so I was currently reworking the floating around Zenoss provider to work
properly with Zenoss 3. However, I encountered the following problem:

The Webservice-Call (whether it is XMLRPC or REST) to add a device will
in Zenoss 3 now create a task on the Zenoss Server, which will add a
device. So the return code of the call represents the successful or
failed creation of the task. But there is no way to figure out whether
adding the device was actually successfull unless we lookup the device
itself how we would do it in the exists? method. However, this only
succeeds if the task have already run.

So actually we would have to wait for the task engine to process the
created task and then we would know wether adding was successful or not.
We could do this by waiting a certain amount of time (current celsius
degree times PI ...) or if there is a way to query the task engine:
Query it unless the task is processed and then check if the device shows
up or not.
However, both ways would block puppet for a (un)certain amount of time.

So my current solution was to fire and forget. Which runs the provider
without any blocking calls, however if there are for example any wrong
parameters and only the task itself will do the parameter checking, I
won't be able to detect that adding the device failed (and especially:
Why it failed!) and furthermore, puppet will try to add the device again
in the next run.

I think this is a general problem with puppet providers that will call
services that will finish the task asynchronously. So I'm asking myself
if there are any best practices to deal with such interfaces? Should
puppet actually be able to deal with this kind of calls? Or is the fire
and forget solution the appropriate one.

~pete

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" 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-dev?hl=en.

Reply via email to