[jboss-jira] [JBoss JIRA] (WFCORE-788) Executing a composite operation allowing services to restart fails if the first operation relies on a capability of a remove operation

James Perkins (JIRA) issues at jboss.org
Wed Jul 1 20:41:02 EDT 2015


     [ https://issues.jboss.org/browse/WFCORE-788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Perkins updated WFCORE-788:
---------------------------------
    Description: 
This does seem to be somewhat of an edge case as the only way to reproduce it is to add the {{allow-resource-service-restart=true}} header to a composite operation. The first operation must also need access to a capability provided by a resource being removed. It's likely an acceptable failure, but the failure isn't seen when executing the same composite operation again.

The issue seems to be that the [capability is removed|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/capability/registry/RuntimeCapabilityRegistration.java#L81] on the first execution that fails and is rolled back. On the second execution of the composite operation there is no [capability registered|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L1369] registered in the {{RuntimeCapabilityRegistration}} so the [remove|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L1385] of the capability doesn't happen. This allows the first operation to pass.

  was:
This seems to be somewhat of an edge case, but it does exist. In the reproduce instructions you'll see a {{disable}} followed by a {{remove}} composite operation fails if the {{allow-resource-service-restart=true}} is set. It's likely an acceptable failure, but the failure isn't seen when executing the same composite operation again. 

The issue seems to be that the [capability is removed|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/capability/registry/RuntimeCapabilityRegistration.java#L81] on the first execution that fails and is not added back. On the second execution of the composite operation there is no [capability registered|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L1369] so the [remove|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L1385] of the capability doesn't happen which makes the first step of the operation happy as the capability still exists.




> Executing a composite operation allowing services to restart fails if the first operation relies on a capability of a remove operation
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFCORE-788
>                 URL: https://issues.jboss.org/browse/WFCORE-788
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>            Reporter: James Perkins
>            Assignee: Brian Stansberry
>
> This does seem to be somewhat of an edge case as the only way to reproduce it is to add the {{allow-resource-service-restart=true}} header to a composite operation. The first operation must also need access to a capability provided by a resource being removed. It's likely an acceptable failure, but the failure isn't seen when executing the same composite operation again.
> The issue seems to be that the [capability is removed|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/capability/registry/RuntimeCapabilityRegistration.java#L81] on the first execution that fails and is rolled back. On the second execution of the composite operation there is no [capability registered|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L1369] registered in the {{RuntimeCapabilityRegistration}} so the [remove|https://github.com/bstansberry/wildfly-core/blob/discard-model/controller/src/main/java/org/jboss/as/controller/ModelControllerImpl.java#L1385] of the capability doesn't happen. This allows the first operation to pass.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list