Bug 631895 - Launch discovery on a particular resource
Summary: Launch discovery on a particular resource
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: unspecified
Hardware: All
OS: All
low
medium
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-08 15:35 UTC by maximilien.wiktorowski
Modified: 2011-05-24 01:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-24 01:10:27 UTC
Embargoed:


Attachments (Terms of Use)

Description maximilien.wiktorowski 2010-09-08 15:35:01 UTC
Description of problem:

Because service scans are normally very expensive to perform the service scan frequency is set to 24 hours by default and we can't down it a lot. So it will be usefull to be able to launch a service scan for a particular resource only.

For example using --resourceId combined with discovery command from agent prompt.

Actual results:
not possible

Expected results:
launch service scan on that resource

Comment 1 John Mazzitelli 2010-09-08 18:00:51 UTC
git commit 05f3a00fae75d97d066559c7671dc4f0770a1dbd

allows a user to enter --resourceId option to discovery prompt command in order to perform a service scan:

discovery --verbose --resourceId=10013

Like the rest of the options of this command (exception being --ful) this new feature still will not send up an inventory report to the RHQ Server - you use --full for that.

This --resourceId is to assist developers while they are writing plugins to test service scans or allows users to see what the next service scan would detect. 

Since service scans are scheduled every 24 hours by default, this helps people see if any services can be found without waiting the 24 hour cycle to repeat - if something is discovered using this command, you can do a "discovery --full" to force a full discovery to be performed and the inventory report sent up to the server.

IIRC, due to the nature of the code and the inventory discovery workflow, its not trivial to get a partial inventory report to make its way to the server and have the agent inventory get populated. That's why this --resourceId performs a "detached discovery" (i.e. the report is just printed to the console and not sent up to the server). "discovery --full" is the only way to force the report to get sent to the server; that works because its actually doing the full server/service scan workflow, rather than just a partial scan.

Comment 2 Rajan Timaniya 2010-10-22 09:46:10 UTC
Verified on RHQ-Master build #442
http://hudson-qe.rhq.rdu.redhat.com:8080/view/RHQ/job/ci-rhq-master/442/

Observation:
discovery --verbose --resourceId=<RESOURCE_ID>
This works fine to scan specific service.

> discovery --verbose --resourceId=10003
Service discovery run for resource [dhcp1-1.pnq.redhat.com RHQ Server]
=== Service Scan Inventory Report ===
Start Time:     Oct 22, 2010 3:12:06 PM
Finish Time:    Oct 22, 2010 3:12:06 PM
Resource Count: 272

Resource: Resource[id=10003, type=JBossAS Server, key=/data/jon/build/rhq442/rhq-server-4.0.0-SNAPSHOT/jbossas/server/default, name=dhcp1-1.pnq.redhat.com RHQ Server, parent=dhcp1-1.pnq.redhat.com, version=4.2.3.GA]

Comment 3 Corey Welton 2011-05-24 01:10:27 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 4 Corey Welton 2011-05-24 01:10:44 UTC
Bookkeeping - closing bug - fixed in recent release.


Note You need to log in before you can comment on or make changes to this bug.