Need advice about agent plugin design
by Steven North
I am trying to design an RHQ/JON agent plugin to manage a software
resource with the following characteristics:
- there is the software itself (the installation);
- there are a variable number of "bundles" of configuration information
about 250KB in size each which need to be read from and written to the
agent; and
- there are "log" files which can 10-50MB in size each which need to be
read from the agent.
I think I am pretty clear on how to handle the software itself--just
like any number of other agents.
I am not sure how to handle the configuration bundles and the large log
files.
We might want to have the RHQ/JON server manage different versions of
these configuration files and distribute them to multiple remote agents.
Is there some existing domain object that would handle the read/write
aspect of the configuration bundles (zip files)? Could the "package"
concept be used for these? Would we need to create a new domain object
on the server side for these bundles? If so, is there an example of
this kind of thing?
For the log files, I see some mention of the SupportFacet. Would this
be appropriate for retrieving large log files? Is there an example of this?
We expect to access the configuration bundles and the log files using
remote client operations because we have a separate GUI tool to
build/edit the configuration bundles and to correlate and analyze the
log files. Is there an example of using a remote client to pull files
from and push files to remote agents?
Thanks in advance for any advice you can give or examples you can point to.
Steve
10 years, 1 month
MeasurementUnits (EPOCH_MILLISECONDS, EPOCH_SECONDS)
by Jiri Kremser
Hi,
in plugin descriptor, there can be a metric definition with unit type "epoch_milliseconds" or "epoch_seconds" (rhq-configuration.xsd allows it). What kind of metric should could be represented by epoch_milliseconds? Shouldn't the exact time moments (what values epoch_milliseconds represent) be addressed rather by traits?
I am asking because the values of this type are not formatted (https://bugzilla.redhat.com/show_bug.cgi?id=857144).
I think these two unit types should be removed from MeasurementUnits and xml schema, however there might be some plugins out there using it, so what about deprecation? Are there any edge cases, when these unit types do make sense?
JK
10 years, 1 month
Configuration instance builder
by Lukas Krejci
Hi all,
on a tangent to my current work on the provisioning subsystem I created a fluent builder for Configuration instances.
In my opinion, this will greatly simplify the task of creating the complex configuration objects, mainly while writing the tests.
I placed the builder directly in the Configuration class so that it is more easily discoverable, so this has an impact on our remote API, because we'll start exposing this class.
I don't see anything wrong with it though, it should help people in the CLI, too.
The code along with tests (that cover the builder code by 100%) is in this commit:
https://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?h=lkrejci/configura...
If you have any ideas for improvements of the API, its usage or are opposed to this going to master, please speak up.
I am going to merge this into master in a couple of days.
Thanks,
Lukas
10 years, 9 months
Cassandra Schema Management Tool
by Stefan Negrea
Hello Everybody,
Here are the design plans for the new Cassandra schema management tool:
1) A version table will keep track of the current schema version
2) The initial setup
a) Will create:
i)Initial RHQ admin user/password
ii) RHQ keyspace
iii) Schema versioning column family (=table)
b) Once the initial setup is done, it will never run again
3) Everything else will be installed/updated via incremental changes:
a) One change file per version change.
b) Multiple changes can be bundled in a change file.
c) The name of the change file will be used for database versioning purposes.
d) If a change has already been applied it will not be applied again for the lifetime of the installation.
e) If an incremental change fails, the upgrade process stops.
f) The upgrade files will be in XML format, with a very simplistic XML Schema.
4) There will not be a single schema file for new installs.
a) All installs will follow this incremental upgrade process.
5) All schema modifications outside of the schema manager will not be supported and are at risk.
Starting with a simple and minimalist tool is the best solution (minimal set features, more robust). I expect the tool to evolve over time but if we keep things simple, then it will be to easier to maintain over time.
Anything that I might be missing?
Thank you,
Stefan Negrea
Software Engineer
10 years, 10 months
Cassandra branch merging into master in the next couple of hours
by Jay Shaughnessy
Devs,
This is an FYI that we'll be merging the Cassandra branch into master
very soon. If you have any reason to delay the merge please let us know
ASAP.
There will be impact to your dev environments as presented in
yesterday's demo. If you missed the demo you can watch the elluminate
recording: (note: the demo ran long due (1' 45") due to various discussions)
https://sas.elluminate.com/mr.jnlp?suid=M.ACC9F1D6F67A0CC0F7B70514054FE6&...
In short, you should do the following from your RHQ root (and add any db
profile that applies to your env):
1) ** BEFOREYOU PULL **
Clean your environment from the root: > mvn clean -Pdev,enterprise
2) Pull
3) Build the forked versions of Cassandra components that we currently
need: > ./build_deps.sh
4) Rebuild everything: > mvn -Pdev,enterprise -DskipTests
4a) Your build may stop at dbutils due to dbversion not being up to
date. If so:
> cd modules/core/dbutils
> mvn -Ddbsetup -Pdev
> resume your full build
5) Move to your dev-container bin directory
NOTE: If you are in Windows you'll want to refer to the wikis at
this point, there are windows specifics you need to know.
6) Use rhqctl to install: > ./rhqctl install
At this point you should have a dev environment Storage Node, Server and
Agent running in the background. You can start/stop/status these with
rhqctl, supplying --storage|--server|--agent as optional params.
The following wiki pages exist to help (and there ares some Windows
specifics in here if you are on Windows):
The Control Script:
https://docs.jboss.org/author/display/RHQ/RHQ+Control+Script
Advanced Build Notes:
https://docs.jboss.org/author/display/RHQ/Advanced+Build+Notes
https://docs.jboss.org/author/display/RHQ/Advanced+Build+Notes#AdvancedBu...
******* Please help us improve the wikis as needed. If you run into any
problems please as on #rhq **********
10 years, 10 months
Database monitoring and connection pooling
by Elias Ross
The database plugin does not use connection pooling. I think the idea
is that the Resource (Oracle/MySQL/etc.) holds a single connection and
provides it to sub-resources. Say if you are monitoring a database
table or number of users logged in you call this API:
public interface DatabaseComponent<T extends ResourceComponent<?>>
extends ResourceComponent<T> {
Connection getConnection();
void removeConnection();
}
Problems arise with multiple threads. Are connections useable across
multiple threads? Meaning, if an availability check runs and also a
metric collection runs, both threads may be hitting the same
connection. This should be okay in theory, but there are many
potential pitfalls, including dealing with commit/rollback, resource
leaking, etc.
The other problem is, contrary to what the API implies, you would not
want to close the connection by calling 'removeConnection', because
what that would cause is interference with other threads' work. In
practice (looking at the code), removeConnection is called when an
error happens, not when done with running a query.
The solution I suggest is:
1) Implement the generic database plugin using a database connection
pool. BoneCP is my suggestion. It is very small and simple. I would
simply hard-code some defaults in there and add some basic logging.
2) Deprecate 'removeConnection' or remove it entirely (API breakage)
3) Update the (Java) documentation.
4) Update mysql, oracle plugins to remove the connection once obtained
through 'getConnection'.
Thoughts?
10 years, 10 months
Looking for a way to call JBoss AS 7 CLI script out of JON
by Roland Brackmann
Hi everyone,
does anyone thought of a clever way to call a JBoss AS 7 cli script out
of JON ?
I'd like to use JON as a single point of entry for setting up a JBoss AS
7 environnement.
Maybe someone has already a bundle scripted that does this, or maybe a
JON CLI script ?
Another thought : It would be cool to be able to interpret the return
value...
Thanks
Roland
10 years, 10 months
exception with CriteriaQueryRunner
by John Sanda
I'm hitting the following exception regularly,
1:19:21,821 ERROR [org.jboss.as.ejb3.invocation] (RHQScheduler_Worker-3) JBAS014134: EJB Invocation failed on component MeasurementDefinitionManagerBean for method public abstract org.rhq.core.domain.util.PageList org.rhq.enterprise.server.measurement.MeasurementDefinitionManagerLocal.findMeasurementDefinitionsByCriteria(org.rhq.core.domain.auth.Subject,org.rhq.core.domain.criteria.MeasurementDefinitionCriteria): javax.ejb.EJBTransactionRolledbackException: PageList was passed an empty collection but 'totalSize' was 146, PageControl[page=1, size=200, sort[id ASC]]
.
.
.
at org.rhq.enterprise.server.measurement.MeasurementDefinitionManagerLocal$$$view50.findMeasurementDefinitionsByCriteria(Unknown Source) [rhq-enterprise-server-ejb3.jar:4.8.0-SNAPSHOT]
at org.rhq.enterprise.server.resource.metadata.MeasurementMetadataManagerBean$1.execute(MeasurementMetadataManagerBean.java:227) [rhq-enterprise-server-ejb3.jar:4.8.0-SNAPSHOT]
at org.rhq.enterprise.server.resource.metadata.MeasurementMetadataManagerBean$1.execute(MeasurementMetadataManagerBean.java:224) [rhq-enterprise-server-ejb3.jar:4.8.0-SNAPSHOT]
at org.rhq.enterprise.server.util.CriteriaQuery$QueryResultsIterator.next(CriteriaQuery.java:152) [rhq-enterprise-server-ejb3.jar:4.8.0-SNAPSHOT]
at org.rhq.enterprise.server.resource.metadata.MeasurementMetadataManagerBean.deleteMetadata(MeasurementMetadataManagerBean.java:241) [rhq-enterprise-server-ejb3.jar:4.8.0-SNAPSHOT]
This happened after starting a newly built dev-container and then deleting several plugins. I do not think that this is specific to the ResourceTypesJob. Can someone who is running a master build check this out? I think the bug is in master as well.
- John
10 years, 10 months