tfonteyn/profilecloner

Not working on WildFly 10.0.0.RC5

Closed this issue · 3 comments

I'm trying to create a clone of full-ha profile, but the batch fails without giving any real cause for the failure.
When I've tried running the lines one by one, there are several ones which fail (won't list all here) but at least some seem to be depending on order of adds, ex:
domain@localhost:9990 /] /profile="kims-test"/subsystem="jsr77":add()
{
"outcome" => "failed",
"failure-description" => {"domain-failure-description" => "WFLYCTL0369: Required capabilities are not available:
org.wildfly.management.jmx in context 'profile=kims-test'; Possible registration points for this capability:
/profile=*/subsystem=jmx"},
"rolled-back" => true
}
but if I add jmx first, then jsr77 can be added (but in the batch file jsr77 was before jmx)
Some additions failed because they had name="xxx" and it complained that name was not a valid attribute

Sorry for a really messy report...
Any chance you could test this with WF10?

Thanks for this :)

I found a couple of issues/causes already:

name attribute is "read-only" which means it should not have been returned by the API I access
=> manually to be removed from these two:

/profile="testp"/subsystem="jca"/workmanager="default"/long-running-threads="default":add(core-threads="50",keepalive-time={"time" => "10","unit" => "SECONDS"},max-threads="50",name="default",queue-length="50")

/profile="testp"/subsystem="jca"/workmanager="default"/short-running-threads="default":add(core-threads="50",keepalive-time={"time" => "10","unit" => "SECONDS"},max-threads="50",name="default",queue-length="50")

Same in the next two, but "thread-pool=x" address can also be present in other sections of the confirguration.
=> same thing, wherever thread-pool is used, remove the name attribute

/profile="testp"/subsystem="batch-jberet"/thread-pool="batch":add(keepalive-time={"time" => "30","unit" => "SECONDS"},max-threads="10",name="batch")
/profile="testp"/subsystem="ejb3"/thread-pool="default":add(keepalive-time={"time" => "100","unit" => "MILLISECONDS"},max-threads="10",name="default")

These are no real surprise to me as similar things happened in AS 7.x; see the source code of the cloner where I deal with exceptions like this. So adding these will be easy enough.

What is worse is after repairing those, and running the batch, I end up with:

...
[domain@orac.usersys.redhat.com:9999 / #] run-batch
The batch failed with the following error (you are remaining in the batch editing mode to have a chance to correct the error): WFLYCTL0063: Composite operation was rolled back

an no indication anywhere what went wrong. Will dig into this when I have some more time.

Side note: yes, the order is important which is why it has to be in one big batch. Re-ordering the commands .. suffice to say I tried and failed.

aha....

2016-02-01 15:10:23,432 DEBUG [org.jboss.as.controller.management-operation](management-handler-thread - 4) WFLYCTL0017: Operation ("add") failed - address: ([
("profile" => "testp"),
("subsystem" => "security"),
("security-domain" => "jaspitest"),
("authentication" => "jaspi")
]) - failure description: [
"WFLYCTL0207: Validation failed for auth-modules",
"WFLYCTL0097: Wrong type for module-options. Expected [OBJECT] but was STRING"

            <security-domain name="jaspitest" cache-type="default">
                <authentication-jaspi>
                    <login-module-stack name="dummy">
                        <login-module code="Dummy" flag="optional"/>
                    </login-module-stack>
                    <auth-module code="Dummy"/>
                </authentication-jaspi>
            </security-domain>

becomes:

/profile="testp"/subsystem="security"/security-domain="jaspitest":add(cache-type="default")
/profile="testp"/subsystem="security"/security-domain="jaspitest"/authentication="jaspi":add(auth-modules=[{code="Dummy",flag=undefined,login-module-stack-ref=undefined,module-options=undefined,module=undefined}])
/profile="testp"/subsystem="security"/security-domain="jaspitest"/authentication="jaspi"/auth-module="Dummy":add(code="Dummy")
/profile="testp"/subsystem="security"/security-domain="jaspitest"/authentication="jaspi"/login-module-stack="dummy":add(login-modules=[{code="Dummy",flag="optional",module=undefined,module-options=undefined}])
/profile="testp"/subsystem="security"/security-domain="jaspitest"/authentication="jaspi"/login-module-stack="dummy"/login-module="Dummy":add(code="Dummy",flag="optional")

Looks like a WildFly bug :( as it should not return those undefined attributes :(