In previous releases of JBoss EAP 6, the handlers for the read-children-names and read-children-resources operations only treated the value of a child-type parameter as a value if there was a registered resource definition for some variant of that type, e.g. a generic registration for '*' and/or some specific registration. The existence of an entry in the resource definition tree for the type alone was insufficient.
Starting a server in a managed domain would result in an entry in the resource definition tree for type 'server', as well as a specific entry of that type for the server. Stopping all servers would result in all specific entries being removed, but the type definition remained. As a result invoking read-children-names or read-children-resources on the host resource, with the child-type param set to 'server' would result in a failure with the message:
----
JBAS014793: No known child type named server
----
In this release, if a child type is registered but there are no specific resource definition entries, the handlers for read-children-names and read-children-resources treat the child type as valid and respond with an empty list instead of with a failure.
Now, if the response to a call to read-children-types on a resource includes a particular child type, then a call to read-children-names or read-children-resources will not fail (assuming there has been no change in state between the calls.)
Description of problem:
read-children-names operation is behaving inconsistently on /host=master/server node. On every other existing node this operation returns empty list, but if I stop every server in domain, and run the operation on 'server' child-type, I get "JBAS014793: No known child type named server" message -> indicating that 'server' is not a known child-type.
Version-Release number of selected component (if applicable):
EAP 6.3.0.ER2
How reproducible:
Always
Steps to Reproduce:
1. Start out-of-box domain and connect to CLI
2. Run following set of commands to stop and remove all default servers
/host=master/server-config=server-one:stop()
/host=master/server-config=server-two:stop()
/host=master/server-config=server-one:remove()
/host=master/server-config=server-two:remove()
/host=master/server-config=server-three:remove()
3. Note, that 'server' node is listed among available children types for /host=master node
/host=master:read-children-types
{
"outcome" => "success",
"result" => [
"core-service",
"interface",
"jvm",
"path",
"server",
"server-config",
"system-property"
]
}
4. Run read-children-names operation on 'server' and 'server-config' child-type.
Actual results:
/host=master:read-children-names(child-type=server-config)
{
"outcome" => "success",
"result" => []
}
/host=master:read-children-names(child-type=server)
{
"outcome" => "failed",
"failure-description" => "JBAS014793: No known child type named server",
"rolled-back" => true
}
Expected results:
/host=master:read-children-names(child-type=server-config)
{
"outcome" => "success",
"result" => []
}
/host=master:read-children-names(child-type=server)
{
"outcome" => "success",
"result" => []
}
Additional info:
We may also update the message in org.jboss.as.controller.ControllerMessages from "No known child type named %s" to "No known child-type named %s"
Description of problem: read-children-names operation is behaving inconsistently on /host=master/server node. On every other existing node this operation returns empty list, but if I stop every server in domain, and run the operation on 'server' child-type, I get "JBAS014793: No known child type named server" message -> indicating that 'server' is not a known child-type. Version-Release number of selected component (if applicable): EAP 6.3.0.ER2 How reproducible: Always Steps to Reproduce: 1. Start out-of-box domain and connect to CLI 2. Run following set of commands to stop and remove all default servers /host=master/server-config=server-one:stop() /host=master/server-config=server-two:stop() /host=master/server-config=server-one:remove() /host=master/server-config=server-two:remove() /host=master/server-config=server-three:remove() 3. Note, that 'server' node is listed among available children types for /host=master node /host=master:read-children-types { "outcome" => "success", "result" => [ "core-service", "interface", "jvm", "path", "server", "server-config", "system-property" ] } 4. Run read-children-names operation on 'server' and 'server-config' child-type. Actual results: /host=master:read-children-names(child-type=server-config) { "outcome" => "success", "result" => [] } /host=master:read-children-names(child-type=server) { "outcome" => "failed", "failure-description" => "JBAS014793: No known child type named server", "rolled-back" => true } Expected results: /host=master:read-children-names(child-type=server-config) { "outcome" => "success", "result" => [] } /host=master:read-children-names(child-type=server) { "outcome" => "success", "result" => [] } Additional info: We may also update the message in org.jboss.as.controller.ControllerMessages from "No known child type named %s" to "No known child-type named %s"