Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4568

Generate a log message if an OperationStepHandler rollbacks the context (in VERIFY stage)

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 9.0.2.Final, 10.0.0.Beta1
    • Server
    • None

    Description

      (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)

      Attachments

        Activity

          People

            jmesnil1@redhat.com Jeff Mesnil
            jaikiran Jaikiran Pai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: