[
https://issues.jboss.org/browse/WFCORE-622?page=com.atlassian.jira.plugin...
]
Brian Stansberry commented on WFCORE-622:
-----------------------------------------
I think there are three cases relevant to this basic problem:
1) An end user invokes an op /host=oldslave/server=a/subsystem=foo:op.
Here, perhaps the user understands that oldslave is using the old API, and therefore
doesn't expect transformation. In that case, result transformation is invalid.
But if they do expect transformation, there's no reason to assume that operation
transformation is not expected as well.
2) The slave HC itself generates the op, as part of domain rollout.
In this case, operation transformation is invalid, as the generated op is what the slave
understands. But is result transformation valid? It may make the response consistent with
current user expectations, or it may not, depending on the relationship to the operation
transformation that may have gone along with the result transformation.
I think this is not a real case though, as custom result transformers don't make much
sense for the add/remove/write-attribute ops generated as part of a domain rollout. Those
ops return 'undefined.'
3) A wildcard read (see WFCORE-282). So,
/host=*/server=*/subsystem=foo:read-attribute(name=bar). The user would likely expect a
consistent response for all servers.
An example custom result transformer might be something that converts types, e.g.
{ "time" => 1, "unit" => "seconds"} becomes 1000L
because the attribute type or response value type has changed from complex to a simple ms
value.
Another example is
https://github.com/wildfly/wildfly/blob/8.x/jmx/src/main/java/org/jboss/a...
which uses a result transformer to provide a value for a newly added attribute.
DomainOperationContext transformation assumes slave host and slave
host's servers receive the same ops
------------------------------------------------------------------------------------------------------
Key: WFCORE-622
URL:
https://issues.jboss.org/browse/WFCORE-622
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Fix For: 1.0.0.CR1
https://github.com/wildfly/wildfly-core/commit/f5c516f2#diff-dc2038399fc7...
assumes that the result transformer for the host request is appropriate for use with the
subsequent requests to that host's servers during domain rollout.
That's a shaky supposition, as the server ops generated from a host request have no
fixed relationship to the host request itself. Alignment is the norm but not a rule. In
particular it can faill apart with composite ops where some steps in the composite are not
relevant to all hosts.
Without this extra transformation, test at [1] fails. This indicates the server op is not
getting the transformation registered at [2] applied. But if it's not getting the
result transformation applied, wouldn't that mean relevant operation transformation
isn't being applied as well?
[1]
https://github.com/wildfly/wildfly-core/blob/master/testsuite/domain/src/...
[2]
https://github.com/wildfly/wildfly-core/blob/master/testsuite/domain/src/...
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)