First Plugin: Discovery

Bryan Kearney bkearney at redhat.com
Tue Dec 15 13:13:02 UTC 2009


On 12/14/2009 06:47 PM, Ian Springer wrote:
> Bryan-
>
> Responses inline below...
>
> --Ian
>
> On 12/14/2009 5:55 PM, Bryan Kearney wrote:
>> Writing a plugin for the fist time.. I have a couple of questions:
>>
>> 1) When new software is installed, how does the version information get
>> updated? Do you have to re-run discovery on regular intervals?
>>
> Yep, discovery reports the current version. Discovery does run
> periodically - once per hour for server scans and once per day for
> service scans. For a Resource that is already committed into Server
> inventory, if the version has changed from its previous value, the
> plugin container notifies the Server that the version has changed for
> that Resource.

So as long as the ID is the same, all is good.. correct?

>> 2) It looks like much of the code is using process-scan tags in the xml.
>> I assume this is a feature to look for running instances which can be
>> accessed via context.getAutoDiscoveredProcesses()
>>
> Correct.
>> 3) Given that 2 is my assumption, is this a best practice? It seems like
>> you would want to discover non-running servers as well.
>>
> Discovery components are free to discover off-line servers if it's
> possible. In some cases, it's not really possible. For example, it's
> impossible to find all the configuration directories that are used to
> start JBossAS instances from a particular JBossAS installation just by
> inspecting the contents of the AS home dir.
>
> Resources have the option to support manual add, which allows users to
> add undiscoverable Resources to inventory via the GUI. This is ideal for
> adding off-line Resources when the plugin doesn't support discovering them.

But best practice I assume is to try and discover it?

>> 4) What is the best practice with the new Raw config stuff is a server
>> has more than one config file? Does that matter at all in creating the
>> classes behind the plugin?
>>
> I'll leave this one for the raw config guys to answer definitively, but
> I think the server component would just expose all of the files via raw
> config subsystem, rather than just one.

Thanks!

-- bk




More information about the rhq-devel mailing list