Jaikiran Pai created WFCORE-4568:
------------------------------------
Summary: Generate a log message if an OperationStepHandler rollbacks the
context (in VERIFY stage)
Key: WFCORE-4568
URL:
https://issues.jboss.org/browse/WFCORE-4568
Project: WildFly Core
Issue Type: Enhancement
Components: Server
Affects Versions: 10.0.0.Beta1, 9.0.2.Final
Reporter: Jaikiran Pai
Assignee: Jeff Mesnil
(In context of
https://issues.jboss.org/browse/WFCORE-4560)
Right now, if an OperationStepHandler in the VERIFY stage marks the context for rollback
(through the use of context.setRollbackOnly()), the operation gets rolled back (as
expected), but there's no error message or an exception or any kind of log message
generated from it. As a result, it ends up being difficult to understand why a particular
operation (which might be part of a larger operation) failed. Given that rollbacks are
typically caused because there is some error/problem, I think the rollback we should
perhaps prominently report in the logs an ERROR message and maybe even with an exception
stacktrace which shows the originating call to the context.setRollbackOnly().
In terms of the implementation, the
org.jboss.as.controller.AbstractOperationContext#canContinueProcessing() method is missing
a check to see if the resultAction is already ROLLBACK and hence is not even logging trace
log messages, unlike for some other cases handled in that method.
A concrete example of this issue was demonstrated in
https://issues.jboss.org/browse/WFCORE-4560 where the
org.jboss.as.controller.management.ManagementInterfaceAddStepHandler$VerifyInstallationStep
was rolling back the operation explicitly but there was no indication of that in the logs
and the JVM would just exit.
(Slightly unrelated - I don't understand why there's a separate
VerifyInstallationStep class which is added by the LenientVerifyInstallationStep, instead
of LenientVerifyInstallationStep itself doing the rollback)
--
This message was sent by Atlassian Jira
(v7.12.1#712002)