[jboss-jira] [JBoss JIRA] (WFCORE-3039) Capability requirement can be lost if two attributes on same resource reference the same capability
Brian Stansberry (JIRA)
issues at jboss.org
Wed Jul 19 18:08:00 EDT 2017
[ https://issues.jboss.org/browse/WFCORE-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437870#comment-13437870 ]
Brian Stansberry commented on WFCORE-3039:
------------------------------------------
This problem isn't about reload; the reload just fixes the problem.
The problem is that both initial-providers and final-providers are attributes on the same resource referencing the same "combined-providers" capability. The reproducer executes the "undefine-attribute" last, and that has the effect of removing the requirement, even though the initial-providers value means the requirement is still needed.
There was some logic early on related to including attribute names as part of the requirement registration point data, but it has atrophied due to lack of any apparent good use case so I don't know if it can be cleanly resurrected to help handle this.
Simply switching the order of the undefine-attribute and write-attribute calls should prevent the problem.
> Capability requirement can be lost if two attributes on same resource reference the same capability
> ---------------------------------------------------------------------------------------------------
>
> Key: WFCORE-3039
> URL: https://issues.jboss.org/browse/WFCORE-3039
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Reporter: Darran Lofthouse
> Assignee: Brian Stansberry
> Priority: Critical
>
> With the following three commands the server becomes unable to boot due to a missing dependency: -
> {noformat}
> /subsystem=elytron:write-attribute(name=initial-providers, value=combined-providers)
> /subsystem=elytron:undefine-attribute(name=final-providers)
> /subsystem=elytron/aggregate-providers=combined-providers:remove
> {noformat}
> If however I execute :reload after the first two commands, the final command will fail correctly.
> {noformat}
> [standalone at localhost:9990 /] /subsystem=elytron/aggregate-providers=combined-providers:remove
> {
> "outcome" => "failed",
> "failure-description" => "WFLYCTL0367: Cannot remove capability 'org.wildfly.security.providers.combined-providers' as it is required by other capabilities:
> capability 'org.wildfly.security.elytron' requires it for attribute 'initial-providers' at address '/subsystem=elytron'",
> "rolled-back" => true
> }
> {noformat}
> I am only listing the 'Domain Management' component as I believe the security example is just the reproducer.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list