[jboss-jira] [JBoss JIRA] (WFCORE-4195) CLI/Admin Console does not prompt for a reload after adding a new server-group to server-scoped-roles.

Chao Wang (Jira) issues at jboss.org
Fri Nov 2 01:06:00 EDT 2018


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

Chao Wang commented on WFCORE-4195:
-----------------------------------

User {{test}} can not see the new server group without a reload operation because [ServerGroupScopedRoleWriteAttributeHandler.applyUpdateToRuntime()|https://github.com/wildfly/wildfly-core/blob/7.0.0.Alpha4/domain-management/src/main/java/org/jboss/as/domain/management/access/ServerGroupScopedRoleWriteAttributeHandler.java#L53] (where it applies change to constraint) is not executed for write operation:
{code:java}
/core-service=management/access=authorization/server-group-scoped-role=maintainer-scope-role:write-attribute(name=server-groups, value=[main-server-group,new-server-group]
{code}

It's supposed to be called from a Runtime step handler in AbstractWriteAttributeHandler.execute(), but it's skipped at [if (requiresRuntime(context))|https://github.com/wildfly/wildfly-core/blob/7.0.0.Alpha4/controller/src/main/java/org/jboss/as/controller/AbstractWriteAttributeHandler.java#L97] check.
[AbstractOperationContext.isHostCapableAddress()|https://github.com/wildfly/wildfly-core/blob/7.0.0.Alpha4/controller/src/main/java/org/jboss/as/controller/AbstractOperationContext.java#L1296] returns false as following activeStep.address does not match the address format _The process is a HC, and the address of the operation is a subsystem in the host model or a child thereof_
{code:java}
activeStep.address.size() >= 2 && activeStep.address.getElement(0).getKey().equals(HOST) && activeStep.address.getElement(1).getKey().equals(SUBSYSTEM)
{code}


{code:xml}
[
    ("core-service" => "management"),
    ("access" => "authorization"),
    ("server-group-scoped-role" => "maintainer-scope-role")
]
{code}

I'd like to confirm the correct behavior with [~brian.stansberry] first. If not requiring a reload is preferable option as said in BZ, it seems that ServerGroupScopedRoleWriteAttributeHandler should override execute() and apply change to constraint without matching the activeStep.address format above ? 

> CLI/Admin Console does not prompt for a reload after adding a new server-group to server-scoped-roles.
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WFCORE-4195
>                 URL: https://issues.jboss.org/browse/WFCORE-4195
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Management
>    Affects Versions: 7.0.0.Alpha4
>            Reporter: Chao Wang
>            Assignee: Chao Wang
>            Priority: Minor
>
> CLI/Admin Console does not prompt for a reload after adding a new server-group to server-scoped-roles.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list