Bug 1015585 - Adding a new role mapping and then restarting the server via mgmt interface fails
Adding a new role mapping and then restarting the server via mgmt interface f...
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity urgent
: ER6
: EAP 6.2.0
Assigned To: Darran Lofthouse
Ladislav Thon
Russell Dickenson
:
Depends On:
Blocks: 999622
  Show dependency treegraph
 
Reported: 2013-10-04 10:29 EDT by Ladislav Thon
Modified: 2013-12-15 11:23 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-15 11:23:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-2220 Critical Resolved Unable to reload server after adding role and executing :reload 2016-04-06 13:29 EDT

  None (edit)
Description Ladislav Thon 2013-10-04 10:29:03 EDT
Description of problem:

When you add a new role mapping and then request a server restart via the management interface, your server will crash.

Version-Release number of selected component (if applicable):

EAP 6.2.0.ER4

How reproducible:

Always

Steps to Reproduce:
1. start a new server
   ./bin/standalone.sh
2. run CLI
   ./bin/jboss-cli.sh -c
3. add a new role mapping
   /core-service=management/access=authorization/role-mapping=Operator:add()
4. restart the server
   :reload

Actual results:

The server restarts fine with no error message.

Expected results:

The server "crashes" with an error message:

16:24:48,601 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: Operation ("add") failed - address: ([
    ("core-service" => "management"),
    ("access" => "authorization"),
    ("role-mapping" => "SuperUser")
]): java.lang.UnsupportedOperationException
	at java.util.Collections$UnmodifiableMap.put(Collections.java:1283) [rt.jar:1.6.0_45]
	at org.jboss.as.controller.access.management.WritableAuthorizerConfiguration.addRoleMappingImmediate(WritableAuthorizerConfiguration.java:163) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.domain.management.access.RoleMappingAdd$1.execute(RoleMappingAdd.java:76) [jboss-as-domain-management-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:624) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:502) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:285) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:280) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:277) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:288) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.server.ServerService.boot(ServerService.java:349) [jboss-as-server-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.server.ServerService.boot(ServerService.java:324) [jboss-as-server-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:250) [jboss-as-controller-7.3.0.Final-redhat-7.jar:7.3.0.Final-redhat-7]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

16:24:48,609 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.remoting.endpoint.management (missing) dependents: [service jboss.remoting.management.channel.registry] 

16:24:48,611 FATAL [org.jboss.as.server] (Controller Boot Thread) JBAS015957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
16:24:48,617 INFO  [org.jboss.as.controller] (MSC service thread 1-6) JBAS014774: Service status report
JBAS014776:    Newly corrected services:
      service jboss.remoting.endpoint.management (no longer required)

16:24:48,619 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015950: JBoss EAP 6.2.0.Beta1 (AS 7.3.0.Final-redhat-7) stopped in 4ms

Additional info:

Note that it's not even necessary to enable the "rbac" provider. Also note that after the server crashes, it can be started just fine, suggesting that there's probably something wrong in the runtime model.
Comment 1 Ladislav Thon 2013-10-04 10:30:11 EDT
Meh, once again I swapped the "actual" and "expected" results :-(
Comment 6 Ladislav Thon 2013-10-21 06:35:10 EDT
Verified with EAP 6.2.0.ER6.

Note You need to log in before you can comment on or make changes to this bug.