[jboss-jira] [JBoss JIRA] (WFCORE-442) AbstractMultiTargetHandler-based handlers do not propagate failures to the top level failure-description

Brian Stansberry (JIRA) issues at jboss.org
Tue Dec 2 15:01:40 EST 2014


    [ https://issues.jboss.org/browse/WFCORE-442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024524#comment-13024524 ] 

Brian Stansberry commented on WFCORE-442:
-----------------------------------------

I haven't looked carefully, but a likely place to put this is in the ResultHandler that GlobalOperationHandlers.ModelAddressResolver passes to OperationContext.completeStep.

Note that it is *critical* in this work to make sure we don't leak resource addresses via a failure description that RBAC is trying to hide. The current stuff in that ResultHandler is about that requirement, and must not be broken. Use git annotate to understand the history and purpose of that code.

> AbstractMultiTargetHandler-based handlers do not propagate failures to the top level failure-description
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WFCORE-442
>                 URL: https://issues.jboss.org/browse/WFCORE-442
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 1.0.0.Alpha13
>            Reporter: Brian Stansberry
>
> An example is worth a thousand words:
> {code}
> [standalone at localhost:9990 /] /path=*:query(where={read-only=1})
> {
>     "outcome" => "failed",
>     "result" => [
>         {
>             "address" => [("path" => "jboss.server.temp.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.server.temp.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT/standalone/tmp",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "user.home")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "user.home",
>                 "path" => "/Users/hbraun",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "jboss.server.base.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.server.base.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT/standalone",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "java.home")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "java.home",
>                 "path" => "/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "user.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "user.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "jboss.server.data.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.server.data.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT/standalone/data",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "jboss.home.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.home.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "jboss.server.log.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.server.log.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT/standalone/log",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "jboss.server.config.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.server.config.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT/standalone/configuration",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "rolled-back" => true
>         },
>         {
>             "address" => [("path" => "jboss.controller.temp.dir")],
>             "outcome" => "failed",
>             "result" => {
>                 "name" => "jboss.controller.temp.dir",
>                 "path" => "/Users/hbraun/dev/prj/wildfly-core/core-build/target/wildfly-core-1.0.0.Alpha14-SNAPSHOT/standalone/tmp",
>                 "read-only" => true,
>                 "relative-to" => undefined
>             },
>             "failure-description" => "Illegal argument for attribute 'read-only'. Expected type BOOLEAN",
>             "rolled-back" => true
>         }
>     ],
>     "rolled-back" => true
> }
> {code}
> One item in the set has a failure description but the overall response does not.
> ReadResourceDescriptionHandler handles similar things but has logic for creating an overall failure-description.



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the jboss-jira mailing list