On Mon, 2014-02-17 at 16:48 +0100, Libor Zoubek wrote:
Hello,
I started to work on
https://bugzilla.redhat.com/show_bug.cgi?id=1054360 I
have several more or less cosmetic questions:
1. In order to run jboss-cli plugin needs to know AS7 native management
port and interface. I've introduced 1 pluginConfig property <host>:<port>
and added it into "operations" group. Could it be considered as correct? I
mean I could create 2 properties (similar to what we have for http
management interface host and port).
This information is already part of the binding managers resource
configuration. We should be reading these values directly from that
resource.
Perhaps alternatively we allow the user to override that but then that
would mean that they would be using one JBoss EAP server to manage a
completely different JBoss EAP server. I can't imagine that would be
ideal.
2. Plugin in the end runs jboss-cli process with several parameters.
I am
setting ProcessExecution.setWaitForCompletion some hardcoded value to wait
for process to finish. Is it possible/recommended to fill the value with
timeout for operation defined in plugin descriptor? When timeout
ProcessExecution.setWaitForCompletion is reached, child process is killed,
I tend to set such timeout to very big number, since I don't want child
script to get interrupted in case user did not correctly set operation
timeout (he did not expect his script to run too long).
Operations already have a timeout which determine how long they run. We
should definitely be using that.
A hard-coded value would be very bad and a timeout shorter then the
user's configured default timeout would be very bad.
4. What would you suggest as default timeout for
"executeCommands" and
"executeScript" operations? (Iam now on 60s)
The default timeout is already set for operation execution. I think it
is 10 minutes.
5. As scripts are expected to do AS configuration changes, would you
recommend to requestAvailabilityCheck() and
requestDeferredChildResourcesDiscovery() after successfull script
execution?
I don't think an avail scan would be necessary in most cases but an
option would be very useful. Perhaps the operation can have a boolean or
other argument? By default it would be set to false or NO_AVAIL_SCAN.
--
Larry O'Leary
https://plus.google.com/+LarryOLeary