[
https://issues.jboss.org/browse/WFLY-1939?page=com.atlassian.jira.plugin....
]
Emanuel Muckenhuber resolved WFLY-1939.
---------------------------------------
Assignee: Emanuel Muckenhuber (was: Brian Stansberry)
Resolution: Out of Date
This seems to be resolved in upstream.
Can not *switch* from an attribute to an alternative
----------------------------------------------------
Key: WFLY-1939
URL:
https://issues.jboss.org/browse/WFLY-1939
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Domain Management
Affects Versions: 8.0.0.Alpha4
Reporter: Jeff Mesnil
Assignee: Emanuel Muckenhuber
use case:
a resource defines 2 attributes that are alternative of each other. Only 1 attribute can
be defined for the resource. The write attribute (and undefine) handler ensures that the
model respects this constraint.
The user wants to *switch* to an attribute A to its alternative B using the CLI.
I proposed to use the batch command to create a composite operation which:
1. undefine the attribute A
2. write the attribute value for B
I was expecting this to succeeds but it fails.
For example, the htt-interface resource defines 2 attributes interface and socket-binding
that are alternatives and checks this constraint in
org.jboss.as.server.operations.HttpManagementWriteAttributeHandler#execute
by adding a operation handler during the MODEL stage.
If I run a batch, it fails:
{noformat}
[standalone@localhost:9990 / #] list-batch
#1
/core-service=management/management-interface=http-interface:undefine-attribute(name=socket-binding)
#2
/core-service=management/management-interface=http-interface:write-attribute(name=interface,
value=management)
[standalone@localhost:9990 / #] run-batch
Failed to perform operation: java.util.concurrent.ExecutionException: Operation failed
{noformat}
On the server side:
{noformat}
11:14:58,763 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001:
Failed to start service jboss."remoting
".remoting-http-upgrade-service.http-management: org.jboss.msc.service.StartException
in service jboss."remoting ".remoting-http-upgrade-service.http-management:
Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1900)
[jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
Caused by: java.lang.NullPointerException
at
org.jboss.as.remoting.RemotingHttpUpgradeService.start(RemotingHttpUpgradeService.java:107)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1944)
[jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1877)
[jboss-msc-1.2.0.Beta2.jar:1.2.0.Beta2]
... 3 more
11:14:58,763 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 4) JBAS014612: Operation ("write-attribute") failed
- address: ([
("core-service" => "management"),
("management-interface" => "http-interface")
]): java.util.concurrent.CancellationException: JBAS014770: Service install was
cancelled
at
org.jboss.as.controller.OperationContextImpl$ContextServiceBuilder.install(OperationContextImpl.java:1362)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.server.operations.HttpManagementAddHandler.installHttpManagementConnector(HttpManagementAddHandler.java:257)
[wildfly-server-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.server.operations.HttpManagementWriteAttributeHandler.updateHttpManagementService(HttpManagementWriteAttributeHandler.java:106)
[wildfly-server-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.server.operations.HttpManagementWriteAttributeHandler.applyUpdateToRuntime(HttpManagementWriteAttributeHandler.java:86)
[wildfly-server-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:101)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:608)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:486)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:275)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:270)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:251)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:138)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:205)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:110)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$2.run(ModelControllerClientOperationHandler.java:157)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$2.run(ModelControllerClientOperationHandler.java:153)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_21]
at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_21]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:153)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:296)
[wildfly-protocol-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:518)
[wildfly-protocol-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.0.Final.jar:2.1.0.Final]
11:14:58,777 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 4) JBAS014603: caught exception attempting to revert
operation undefine-attribute at address [
("core-service" => "management"),
("management-interface" => "http-interface")
]: org.jboss.as.controller.OperationFailedException: JBAS015819: interface is not allowed
when [socket-binding, secure-socket-binding] are present [ "JBAS015819: interface is
not allowed when [socket-binding, secure-socket-binding] are present" ]
at
org.jboss.as.server.operations.HttpManagementAddHandler.validateResolvedModel(HttpManagementAddHandler.java:142)
at
org.jboss.as.server.operations.HttpManagementAddHandler.installHttpManagementConnector(HttpManagementAddHandler.java:168)
at
org.jboss.as.server.operations.HttpManagementWriteAttributeHandler.updateHttpManagementService(HttpManagementWriteAttributeHandler.java:106)
at
org.jboss.as.server.operations.HttpManagementWriteAttributeHandler.revertUpdateToRuntime(HttpManagementWriteAttributeHandler.java:99)
at
org.jboss.as.server.operations.HttpManagementWriteAttributeHandler.revertUpdateToRuntime(HttpManagementWriteAttributeHandler.java:43)
at
org.jboss.as.controller.AbstractWriteAttributeHandler$1$1.handleRollback(AbstractWriteAttributeHandler.java:111)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext$RollbackDelegatingResultHandler.handleResult(AbstractOperationContext.java:1012)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext$Step.handleRollback(AbstractOperationContext.java:981)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:939)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:914)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext$Step.access$300(AbstractOperationContext.java:866)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.finishStep(AbstractOperationContext.java:719)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:675)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:486)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:275)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:270)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:251)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:138)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:205)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:110)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$2.run(ModelControllerClientOperationHandler.java:157)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$2.run(ModelControllerClientOperationHandler.java:153)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_21]
at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_21]
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:153)
[wildfly-controller-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:296)
[wildfly-protocol-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:518)
[wildfly-protocol-8.0.0.Beta1-SNAPSHOT.jar:8.0.0.Beta1-SNAPSHOT]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_21]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_21]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
[jboss-threads-2.1.0.Final.jar:2.1.0.Final]
{noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira