irc-bot: commit link now points to the GitHub
[1073201] Agent does a discovery loop if the inventory contains an unknown resource
It's possible to disable a plugin on an agent after resources of that plugin's
types are already in server-side inventory.  The server will report those
resources to the agent during an inventory sync.  The agent will treat them
as "unknown" resources because those resources will not have containers.

This fixes the handling for unknown resources with disabled resource types.
It ensures they are not merged into agent-side inventory and also do not
trigger further discovery scans.  Additionally, it now generates a
ResourceError for the server-side resource to help notify the user that the
resource is no longer being managed, and should be uninventoried.  Only
uninventory will stop the inventory sync overhead.
[1073201] Agent does a discovery loop if the inventory contains an unknown resource
Patch supplied by <elias_ross@apple.com>.  The patch worked around the issue
although in a prior commit I put in a fix for the core issue.  But the patch
is also useful.  I'm applying parts of it, manually, as applying it verbatim
was not applicable after my initial change.

Thanks Elias!

-----------------------------------
Original Patch Comment:

The main fix is keeping a reference to the scheduled service rescan Future and
prevent a scan from being scheduled again before execution. This also has
executeServiceScanDeferred() work the same way.

The other related fixes are for:
1) Only do availability checking for synched/merged/deleted resources, not a
full scan.  As we have the references for this, it seems worthwhile to prevents
lots of scans (and overloading the server) if an unknown resource shows up.
2) Concurrency. Setters/getters should be synchronized if accessed across threads.
3) Use 0 for scan time, as we can then avoid getting system time.
4) In cases Executor.submit(Callable) is used and Future isn't needed, use
Runnable instead.
-----------------------------------

A couple of modifications:
- set availabilityCheck time to 1, as opposed to 0, because 0 indicates
  an initialized state and does not guarantee an avail check is perfomed.
- when requesting an avail check for an unknown resource, make it
  recursive so the unknown children also get checked.

Additionally, now when updating plugin config, root the ensuing discovery at
the updated resource.
[1073201] revisions due to test failures
- Go back to providing a full avail report if there are inventory sync
  changes.  This isn't really that inefficient agent-side because it's not
  a full scan, but rather a full report.  We still only check avail for
  those resources that have not yet provided avail, and the regularly
  scheduled checks.
- Don't just skip a service scan if one is in progress. We should scan again
  from the top to guarantee nothing gets missed.  So, instead, cancel the
  current scan and add interrupt logic such that it reports what it has
  discovered to that point. And then start a new scan.
- update Discoverytest to explcitly wait for discovery to complete, the
  changes seem to have changed the dynamics of the test.

These changes still need to be monitored to ensure things are behaving...
[BZ 1073096] - 'rhqctl -h install' tries to install the components instead of showing a help - Finding out whether user wants to just print a help. If it is the case, no warning ('An agent RPM installation was found...') with consequent 30s waiting is displayed.
[BZ 1073096] - Adding the check for any unrecognized arguments.
[BZ 1073096] - Simplifying the code: fail fast is --help option is present.
[BZ 1073096] - The name of the command should not be part of the command's arguments. It worked in the previous implementation, because it ignored unrecognized options. But not now.
[BZ 1073096] - When debugging the rhqctl code I came across to ConcurrentModificationException. Altought it is unlikely to happen in the production code without debuging, it is still posible -> making the copy of undoTasks, because other thread can modify it simultaneously.
[BZ 1073096] - Showing unrecognized args
[BZ 958922] RFE: support for passing plugin config when creating child
resources

Now we support all 4 possible 'ways' to create a resource on RHQ

1. regular resource (was already implemented) - when REST client create
resources that agent would have discovered. Such resources is not possible
to create via UI or CLI

2. content-based resources (was already implemented)

3. resource children: similar to content-based resources, UI analogy is
"Create Child". Create child history exists. - possible resource duplicities
are handled on agent side.

4. manual resources: Resources that could be only manually Imported from UI,
create child history does not exist for those, and their resource key highly
depends on given pluginConfiguration (although resourceName can be passed).
Duplicates are handled on server side, since underlying API does not report
an error when manually imported resource already exists.

For 3. and 4. there's client can optinaly pass only required plugin/resource
configurations. In rest api code, we retrieve all the defaults from resource
type and then apply passed values on top.
BZ 1070242 - get remote agent install into non-RHQ product builds.
had to upgrade jsch version to fix a bug that manifested itself as "verify: false" errors that only occurred sometimes. Apparently was a known issue and is fixed in jsch 0.1.51
Bug 1077412 - Restart operation on EAP 5 resource doesn't return failure message when restart fails
[1073201] revision due to regression
When updating plugin config we added an optimization to root the ensuing
service discovery at the resource being updated, as opposed to doing a
full service scan.  The regression resulted from passing the attached
Resource to the agent.  Never pass attached objects to the agent from
the server.  Unfortunately, detaching the object was not viable as it
actually needed to stay attached for the overall logic flow. So, I
lightened the API to just require the resourceId, which is a better agent
API anyway.
[BZ 1075575] Update Cassandra to a version specially crafted to not print the superfluous warning about OpenJDK.
Revert Cassandra dependency update until Nexus repository is fixed.
[BZ 1069679] Expose responseTime metric via rest

callTimes are exposed via endpoint GET /metric/data/{scheduleId}/callTime
supported are both aggregated (default) and 'raw' callTime data. CallTime
values can be pushed via PUT /metric/data/{scheduleId}/callTime. Note that
data retrieved via GET has different format as what is pushed. User pushes
really RAW callTimes (time,callDestination,duration) but he *always*
recieves aggregates.
[BZ 1070668] Incorrect default configuration of RHQDS resource

Installer code fixed to properly fill xa-datasource-class property when
creating RHQDS. Class names for postgres, oracle live as constants in java
class.
added new lines between methods
Merge pull request #14 from lzoubek/bugs/1070668

[BZ 1070668] Incorrect default configuration of RHQDS resource