[jboss-jira] [JBoss JIRA] (WFCORE-1041) Domain controller does not prevent removing extensions with subsystems still registered

Brian Stansberry (JIRA) issues at jboss.org
Wed Oct 7 18:22:00 EDT 2015


Brian Stansberry created WFCORE-1041:
----------------------------------------

             Summary: Domain controller does not prevent removing extensions with subsystems still registered
                 Key: WFCORE-1041
                 URL: https://issues.jboss.org/browse/WFCORE-1041
             Project: WildFly Core
          Issue Type: Bug
          Components: Domain Management
    Affects Versions: 2.0.0.CR6, 1.0.2.Final
            Reporter: Brian Stansberry
            Assignee: Kabir Khan


The main ExtensionRegistry (not the one for HC extensions) on a Host Controller does not detect if the user attempts to remove an extension that still has subsystems installed in the domain profiles.

Trying to do this will fail in domain rollout if the domain has any servers running that use the subsystems, but if there are no such servers (e.g. the DC is running in --admin-only), the remove op will incorrectly succeed. If the DC is then reloaded/restarted boot will fail when the parser encounters the subsystem.

The problem is at L328 of the ExtensionRegistry, 2nd line in the block below:

{code}
                for (String subsystem : subsystemNames) {
                    if (rootResource.getChild(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, subsystem)) != null) {
                        // Restore the data
                        extensions.put(moduleName, extension);
                        throw ControllerLogger.ROOT_LOGGER.removingExtensionWithRegisteredSubsystem(moduleName, subsystem);
                    }
                }
{code}

That path is only valid on a server or for a host extension.

The removeExtension method should be able to figure out if it is for the domain extension by checking 1) the processType field (to see if its an HC) and 2) the rootRegistration param passed to the method. If rootRegistration.getPathAddress().size() == 0, then its not a host extension registry.

Once that is known the scan for the subsystem can check through the profiles instead instead of assuming the subsystems are direct children of the rootResource param.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list