Proposal for improving handling complex types in CLI
by Tomaž Cerar
Hi guys,
there ware some discussions on how we should improve handling complex types
of attribute bit better in CLI.
For most part that was about Map & List types.
After some discussions with few of you I came up with plan / ideas what all
options are there for us to improve on.
you can see current state of proposed enhancements at
https://gist.github.com/ctomc/91055a6f4e7502dcd130
In short, I propose to add set of map-* and list-* global operations and
improve :read-attribute & :write-attribute
with EL like syntax for reading / updating map, list and generic complex
attributes.
Let me know what you think about it, especially Console & CLI folks.
--
tomaz
9 years, 7 months
Customizing a provisioned server
by Stuart Douglas
Hi everyone,
Work on the provisioning tool is now well underway, so I would like to
revisit something I mentioned in my original email, which is allowing
the provisioning tool to customize a provisioned server.
I think there are a few options here, some more palatable than others.
In no particular order:
1) Customize the XML directly
Using this approach we would just directly customize the XML
configuration files. This would basically require the use of XSLT
(yuck), or require us to basically invent our own version of XSLT (even
more yuck). Even though this approach will work, and will be fairly easy
to implement, I think it would really suck from an end-user point of
view, and I think we should discount it.
2) Allow the user to provide CLI commands to customise the server
This is by far my favorite approach. The provisioning file would just
contain a list of CLI commands, and would execute them in order. I think
this is by far the most intuitive, and the CLI is well documented.
3) Allow the user to provide DMR operations to customize the server
Similar to 2, but allow the user to provide DMR or JSON operations to
customize the server. I think this is not nearly as nice as 2, as users
are much more likely to be familiar with the CLI rather than DMR.
I think 2 is by far the best approach, however it does open up the
question of how and when to execute the operations. I think the easiest
way to do this would be to just start the server in admin only mode on a
custom port (so it will not interfere with any existing running Wildfly
instances), and just execute the CLI commands in admin only mode.
Does this all sound reasonable?
Stuart
9 years, 9 months
Embedding a WF instance in the CLI
by Brian Stansberry
Moving a thread to the dev list.
This is about some prototyping I've been doing on weekends 'cause I'm
bored with my regular tasks. I've been playing with direct local
administration of a WF installation via the CLI without requiring a
socket-based connection. The general use case is initial setup type
activities where the user doesn't want to have to launch a WF server or
HC process and potentially have it be visible on the network.
https://issues.jboss.org/browse/WFLY-3288 is one use case; another is a
desire some folks have expressed in being able to do configuration
without first having to edit any xml to avoid port conflicts on 9990 or
9999.
This isn't a major initiative or big priority or anything at this point.
Just something I find interesting and perhaps you will too.
On 5/14/14, 8:54 AM, Alexey Loubyansky wrote:
> Neat :) Yes, figuring out the module path is biting everywhere.
> For file system path command line arguments there is a specialized
> FileSystemPathArgument.
>
Thanks; I'll switch to that.
>
> On 05/13/2014 10:54 PM, Brian Stansberry wrote:
>> Copying Heiko Braun as he expressed some interest in the topic.
>>
>> BTW, I played with this a bit more last weekend and was able to start an
>> embedded server inside the CLI easily enough. See [1] for very raw
>> prototype stuff. You can run bin/jboss-cli.sh (no -c) and then
>>
>> [disconnected/] embed-server
>>
>> There are a couple issues I see, besides the HC stuff I mentioned in my
>> last message.
>>
>> 1) If the CLI is started in a non-modular environment via java -jar
>> bin/client/jboss-cli-client.jar, we'd have to shade jboss-modules into
>> the jar. And then the embed-server command would need params specifying
>> the location of JBOSS_HOME, possibly module path etc. But it could embed
>> a server installed in any accessible filesystem location.
>>
>> But what I did at [1] is based on bin/jboss-cli.sh, where the CLI is
>> running from a WF dist in a modular environment and the embedded server
>> modules are coming from the CLI's own module path. It would be more
>> effort to support embedding a server based on some other module path.
>> Maybe it's no big deal; maybe it's really hard. :)
>>
>> 2) The console logging from the embedded server goes to stdout mixed in
>> with the CLI output. Maybe that's good, maybe it's bad.
>>
>> [1] https://github.com/bstansberry/wildfly/tree/cli-embed
>>
>> On 4/28/14, 10:04 AM, Brian Stansberry wrote:
>>> I was poking around at this for an hour or so over the weekend.
>>>
>>> The standalone case seems pretty straightforward. Seems the existing
>>> embedded server API could work readily enough. The
>>> org.jboss.as.embedded.StandaloneServer interface already provides a
>>> ModelControllerClient.
>>>
>>> The domain case is much harder, as the CLI wants a HostController, not a
>>> ProcessController. I'd really like this to use an in-VM client, not a
>>> remote one, so I don't like having the CLI embed a PC and then the HC is
>>> an external process. My thoughts of the morning are to allow inverting
>>> the HC/PC relationship for this kind of usage. That is, remove
>>> controlling the HC lifecycle from the charge of the PC component. CLI
>>> launches HC, and then the HC creates an in-process PC-ish component (not
>>> a separate process) to manage the server lifecycles. There could be all
>>> sorts of problems with that; it's just the thought for the morning.
>>>
>>> On 4/25/14, 11:49 AM, Alexey Loubyansky wrote:
>>>> Embedding the AS is the best starting point to achieve that! And more
>>>> fun, I agree :)
>>>>
>>>> On 04/25/2014 06:28 PM, Darran Lofthouse wrote:
>>>>> And to think my reason for opening the Jira was just for a common
>>>>> way to
>>>>> mask password inputs where java.io.Console is not available ;-)
>>>>>
>>>>> On 25/04/14 17:09, Brian Stansberry wrote:
>>>>>> On 4/25/14, 10:40 AM, Alexey Loubyansky wrote:
>>>>>>> Wow! Indeed :)
>>>>>>>
>>>>>>> There could be an embedded scope - true, i.e. commands available
>>>>>>> only
>>>>>>> this mode, like add-user, module mgmt related stuff, etc.
>>>>>>
>>>>>> Those commands wouldn't need to be only in that mode though. The
>>>>>> implementation of all of them would be based in the server; the
>>>>>> "client"
>>>>>> aspect of the CLI would just use the management interface. The
>>>>>> difference between an embedded mode and what we have now would
>>>>>> just be
>>>>>> in how the "client" side gets its ModelControllerClient -- what we
>>>>>> have
>>>>>> now vs starting an embedded server and getting some sort of in-vm
>>>>>> client.
>>>>>>
>>>>>>> But it would still mean the server/controller would have to actually
>>>>>>> provide implementations of that functionality and expose it to the
>>>>>>> management tools like the CLI in the embedded mode.
>>>>>>
>>>>>> Yep.
>>>>>>
>>>>>>> I like this idea as a concept - direct local management. W/o any
>>>>>>> remote
>>>>>>> connect/re-connect/disconnect burden.
>>>>>>>
>>>>>>> Extending the CLI with custom modules is on the list too. It's
>>>>>>> probably
>>>>>>> easier to implement at this point.
>>>>>>>
>>>>>>
>>>>>> Likely so, but maybe less fun. ;) I copied you on a PRD-related
>>>>>> thread
>>>>>> where I briefly get into this general area too.
>>>>>>
>>>>>>> Alexey
>>>>>>>
>>>>>>> On 04/25/2014 05:00 PM, Brian Stansberry wrote:
>>>>>>>> Hi Alexey,
>>>>>>>>
>>>>>>>> Wanted to point the discussion on this JIRA out to you as it gets
>>>>>>>> into
>>>>>>>> some fairly fundamental brainstorming that you may find
>>>>>>>> interesting.
>>>>>>>>
>>>>>>>>
>>>>>>>> -------- Original Message --------
>>>>>>>> Subject: [JBoss JIRA] (WFLY-3288) Update add-user to use AESH or
>>>>>>>> move it
>>>>>>>> into the CLI
>>>>>>>> Date: Fri, 25 Apr 2014 09:44:35 -0400 (EDT)
>>>>>>>> From: Darran Lofthouse (JIRA) <issues(a)jboss.org>
>>>>>>>> To: brian.stansberry(a)redhat.com
>>>>>>>>
>>>>>>>>
>>>>>>>> [
>>>>>>>> https://issues.jboss.org/browse/WFLY-3288?page=com.atlassian.jira.plugin....
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ]
>>>>>>>>
>>>>>>>> Darran Lofthouse commented on WFLY-3288:
>>>>>>>> ----------------------------------------
>>>>>>>>
>>>>>>>> That could be very interested, won't go into too much detail in
>>>>>>>> this
>>>>>>>> Jira as it is not directly related shortly I am switching to the
>>>>>>>> SSL
>>>>>>>> related tasks we have outstanding including the out of the box
>>>>>>>> enablement we talked about in Brno - managing an embedded instance
>>>>>>>> could
>>>>>>>> be useful there as well to get it all op based.
>>>>>>>>
>>>>>>>> I can see this task may end up coming back my way combined with the
>>>>>>>> other stuff ;-)
>>>>>>>>
>>>>>>>>> Update add-user to use AESH or move it into the CLI
>>>>>>>>> ---------------------------------------------------
>>>>>>>>>
>>>>>>>>> Key: WFLY-3288
>>>>>>>>> URL: https://issues.jboss.org/browse/WFLY-3288
>>>>>>>>> Project: WildFly
>>>>>>>>> Issue Type: Feature Request
>>>>>>>>> Security Level: Public(Everyone can see)
>>>>>>>>> Components: Domain Management, Scripts
>>>>>>>>> Reporter: Darran Lofthouse
>>>>>>>>> Fix For: Awaiting Volunteers
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Within the add-user utility it is difficult to handle situations
>>>>>>>>> where
>>>>>>>>> we do not have access to a java.io.Console which is the easiest
>>>>>>>>> way to
>>>>>>>>> handle password reading without an echo to the user e.g. in Cygwin
>>>>>>>>> Switching to AESH would allow us to use the implementation
>>>>>>>>> there to
>>>>>>>>> handle this.
>>>>>>>>> Alternatively it may actually make sense to make add-user a
>>>>>>>>> special
>>>>>>>>> mode of the CLI, we may at some point want to switch to runtime
>>>>>>>>> operations being executed on the server so porting to the CLI
>>>>>>>>> could be
>>>>>>>>> the first step to make this possible.
>>>>>>>>> Overall this is going to require further discussion so the
>>>>>>>>> comments
>>>>>>>>> here are just a starting point.
>>>>>>>>
>>>>>>>> --
>>>>>>>> This message is automatically generated by JIRA.
>>>>>>>> If you think it was sent incorrectly, please contact your JIRA
>>>>>>>> administrators
>>>>>>>> For more information on JIRA, see:
>>>>>>>> http://www.atlassian.com/software/jira
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>
>>>
>>
>>
--
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat
9 years, 9 months
Management model attribute groups
by Brian Stansberry
Off and on we've had discussions around the idea of "attribute groups".
We've got some use cases that are crying out for such a thing[1], so I'd
like to propose doing something concrete but simple for these for WF 9,
ideally in the next month.
A big part of my goal here is to ensure that whatever we do doesn't
preclude something more advanced in any next generation management
stuff, e.g. David's stuff.
PART I Concepts
1) What is an attribute group?
The "attribute group" concept I propose is simply a collection of
attributes associated with the same resource type that are independently
configurable but are statically declared to be conceptually related. The
group has a name, and members. The name provides a brief indication of
the nature of the relationship.
The goal is to provide information to the user to help them better
understand the relationship between attributes. In particular,
management tools could use this information to visually present related
attributes together, e.g. in a tab or other grouping widget in the web
console.
2) What isn't an attribute group?
Something relevant to writes.
3) Why would I use a child resource instead of an attribute group?
Because the attributes control a discrete piece of functionality and you
need to be able to turn that on or off as a unit. So you add/remove the
resource.
4) Why would I use a complex attribute with a bunch of fields instead of
n>1 simple attributes in a group.
a) Because the attributes control a discrete piece of functionality and
you need to be able to turn that off as a unit. So users can undefine
the complex attribute.
b) Because it's a common use case that modifications to n>1 of the
fields should be done atomically and you don't want to force users to
use a CLI batch. So you let them use write-attribute and specify the
value of all the fields.
5) Why would I use an attribute group instead of a child resource?
Because requiring users to add a child resource just to set a bunch of
values that are really part of the config of the parent resource forces
them to use a CLI batch to correctly configure the parent resource.
6) Why would I use an attribute group instead a complex attribute?
Because the various attributes should be independently configurable. In
particular, wiping out the config for all of them by simply undefining
the complex attribute isn't appropriate.
PART II Proposed Work
1) The basics
We add a piece of metadata to the read-resource-description output for
an attribute. Name is 'attribute-group', value type is ModelType.STRING,
value is the name of the group, with 'undefined' allowed.
The group is simply the set of attributes that share the same string.
To implement this, we add public String
AttributeDefinition.getAttributeGroup() and add support for setting it
to the relevant Builder. ReadResourceDescriptionHandler outputs the value.
2) XML parsing/marshalling
Modify PersistentResourceXMLDescription such that attributes in an
attribute group get persisted in their own child element, whose name is
the name of the group.
PersistentResourceXMLBuilder exposes a setter to allow users to turn
this on/off for that resource. Turning it off will allow the addition of
attribute group settings for a resource without requiring an immediate
corresponding xsd change.
3) Web console
HAL can make use of the additional metadata at its leisure, and as it
becomes available.
4) Low level management API
The output of read-resource and read-resource-description is modified
such that attributes are sorted by group name and then by attribute name.
5) CLI
I'm not clear on exactly what to do here, but my instinct is the output
of the 'ls -l' command should be modified. Probably add a GROUP column
to the right and sort the order of attributes by group and then by
attribute name.
PART III Other possible things to do
A :read-attribute-group(name=<groupname>) operation or an
"attribute-groups=[<groupname>*]" param to :read-resource, to make it
convenient to read a set of attributes without needing to read the
entire resource.
We could also consider adding an "attribute-groups" section to the
read-resource-description output, where a fuller i18n text description
of the meaning of the group could be written. If we do this we should
probably do it in WF 9 as it will likely add some sort of requirement to
subsystem authors that we expose right from the start.
If you're still awake, comments as always are appreciated.
--
Brian Stansberry
Senior Principal Software Engineer
JBoss by Red Hat
[1] For example, the JDKORB pull request at
https://github.com/wildfly/wildfly/pull/7008 uses child resources in a
number of places where it seems like attribute groups are a better fit.
9 years, 9 months
WildFly SelfMonitor submodule
by Ondrej Zizka
Hi all,
a module for self-monitoring of WildFly was the goal of the diploma
thesis by Vojtech Schlemmer.
I know that in the meantime, Heiko created a submodule for the same purpose.
Still, it could be worth looking at Vojtech's result:
https://is.muni.cz/th/325163/fi_m/?furl=%2Fth%2F325163%2Ffi_m%2F;so=nx;la...
For docs see the text of the thesis (in English), for working configured
server download the Appendix.
It is configurable through CLI (what to monitor, interval of each
monitored metric, aggregation).
One distinctive feature is storing into a database using WildFly's
datasource (IIRC the other doesn't have it).
Copy on GitHub: https://github.com/OndraZizka/wildfly-selfmonitor
It's a rough prototype, so the implementation of some features is really
basic and, so to say, not optimal.
Enjoy :)
9 years, 9 months
Architecture Guides - Which tool(s) should I use?
by Darran Lofthouse
Hi all,
Just looking for some feedback for tools currently being used to achieve something similar to the following.
I am looking to produce a couple of different architecture guides for the changes being made for security, in general for both guides I am looking to add a high level digram that shows the security components and the components within the digram should be clickable to link to the appropriate section in the document.
One thing I would like in the representations of the components is that they support nesting so for example a box called 'authentication mechanisms' could contain both 'sasl mechanisms' and 'http mechanisms'.
Ideally this should be in a git repo so we can accept contributions easily using tools readily available.
Regards,
Darran Lofthouse.
9 years, 9 months
NPE in finalizer of ThreadPoolExecutor
by Sanne Grinovero
Hi all,
I was investigating this issue which I believed initially to be a JDK
bug, but it turns out it's caused by WildFly and I'm not really sure
what problems it could cause.
The symptom is a NullPointerException being thrown in the "Finalizer"
Daemon System Thread, while attempting to shut down a
ThreadPoolExecutor:
Daemon System Thread [Finalizer] (Suspended (exception NullPointerException))
ThreadPoolExecutor.tryTerminate() line: 694 [local variables unavailable]
ThreadPoolExecutor.shutdown() line: 1394
ThreadPoolExecutor.finalize() line: 1477
System$2.invokeFinalize(Object) line: 1267
Finalizer.runFinalizer(JavaLangAccess) line: 98
Finalizer.access$100(Finalizer, JavaLangAccess) line: 34
Finalizer$FinalizerThread.run() line: 210
That line 694 contains this line:
(runStateOf(c) == SHUTDOWN && ! workQueue.isEmpty())) // NPE: workQueue==null
The "workQueue" is final, and proper checks are in place in the
constructor won't allow for it to be initialized with null.
So I believe this is merely the "finalizer" being triggered for an
instance of ThreadPoolExecutor which was not successfully constructed;
indeed if I set a breakpoint on the "throw new
IllegalArgumentException()" line of the constructor, this trips on a
JMS/HornetQ related stack:
Thread [ServerService Thread Pool -- 64] (Suspended (breakpoint at
line 1307 in ThreadPoolExecutor))
owns: PostOfficeImpl (id=270)
owns: HornetQServerImpl (id=271)
owns: JMSServerManagerImpl (id=272)
owns: JMSService (id=273)
ThreadPoolExecutor.<init>(int, int, long, TimeUnit,
BlockingQueue<Runnable>, ThreadFactory, RejectedExecutionHandler)
line: 1307
ThreadPoolExecutor.<init>(int, int, long, TimeUnit,
BlockingQueue<Runnable>) line: 1195
Executors.newFixedThreadPool(int) line: 89
UUIDGenerator.getHardwareAddress() line: 151
UUIDGenerator.getAddressBytes() line: 263
UUIDGenerator.generateStringUUID() line: 206
PostOfficeImpl.addBinding(Binding) line: 481
HornetQServerImpl.loadJournals() line: 1766
HornetQServerImpl.initialisePart2() line: 1593
HornetQServerImpl.access$1400(HornetQServerImpl) line: 178
HornetQServerImpl$SharedStoreLiveActivation.run() line: 2314
HornetQServerImpl.start() line: 435
JMSServerManagerImpl.start() line: 490
JMSService.doStart(StartContext) line: 155
JMSService.access$000(JMSService, StartContext) line: 60
JMSService$1.run() line: 94
Executors$RunnableAdapter<T>.call() line: 511
FutureTask<V>.run() line: 266
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1142
ThreadPoolExecutor$Worker.run() line: 617
JBossThread(Thread).run() line: 745
JBossThread.run() line: 122
This doesn't seem to be a real problem for the finalizer thread as it
ignores any RuntimeException, and also not a problem for the Executor
so I guess the puzzle is far less exciting than the subject of this
email might have made you believe :-)
But still it would be nice to avoid constructing an illegal Executor,
and I have no idea if this could be a real problem for those UUID
Generator services which I see in the stacktrace.
In my integration test I was updating versions of libraries and
application server to EAP 6.4.0.Alpha, but still using an old
"standalone.xml" file. I guess the outdated configuration file might
have fooled some validation.
Thanks,
Sanne
9 years, 10 months
IP6 and Any known incompatibilities between these versions?
by Rob Stryker
Hi all:
JBT is considering updating the following client jar versions for
communication with all wildfly streams 8.x over management api:
marshalling from 1.4.3 to 1.4.9
remoting from 4.0.0 to 4.0.9
xnio from 3.2.0 to 3.3.0
protocol from 8.0.0 to 8.2.0.CR1
controller-client from 8.0.0 to 8.2.0.CR1
The cause for this is that when using the current jars, executing
management tasks with ip6 hosts fails against all wf8.x servers. So
far, updating the jars has passed our smoke tests.
Two questions:
1) Are there any known incompatibilities for those new jar versions with
any wf8.0 or higher? ie, should this new set of jars be able to
communicate flawlessly with wf8.0 through 8.2?
2) This one's more of a curiousity, but does anyone know what caused the
8.0 jars to fail against all servers for management over ip6? I've
combed through jira and git logs a bit but nothing really jumped out at me.
Answers to these two questions would increase our confidence in bumping
the jars more than simple smoke tests.
- Rob Stryker
9 years, 10 months
WF 8 vs EAP 6 and use of -b
by Phil Festoso
Hi all,
One of the changes from EAP 5 to 6 is that the -b option no longer "just works" and requires the admin to change the configuration to use <loopback-address/> instead of <inet-address/>.
Some of my customers were surprised by the change. They enjoyed the ease of use that -b gave them and are hoping to see that feature brought back. I noticed that in WF 8.2 -b does just work (at least on the RHEL vms I tested). Does this mean that users can expect to see -b back in play (ie w/o need for config changes) for EAP 7?
Thanks.
Phil Festoso
Sr. Technical Account Manager, Global Support Services
Red Hat, Inc.
T: 312.612.0035
E: philfest(a)redhat.com
9 years, 10 months
Using Wildfly as a load balancer
by Stuart Douglas
Hi everyone,
A while ago we added support to Wildfly to allow it to be used as a front
end mod_cluster based load balancer.
I am going to blog about this once it appears in a released version, but
for now if anyone wants to try it out I have an example in my github at
https://github.com/stuartwdouglas/modcluster-example
The example basically contains the CLI commands need to start a domain with
two backend servers and a front end load balancer (with a simple deployment
that prints the server name that handles the request, and can start
counting requests to demonstrate sticky sessions and failover), although
the deployment path and local IP address will need to be modified
appropriately.
I'm just posting about this here in case it is interesting to anyone, as it
should provide a very simple way to get started with clustering.
Stuart
9 years, 10 months