]
Chao Wang moved JBEAP-5156 to WFCORE-1635:
------------------------------------------
Project: WildFly Core (was: JBoss Enterprise Application Platform)
Key: WFCORE-1635 (was: JBEAP-5156)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Deployment Scanner
(was: Deployment Scanner)
Target Release: (was: 7.backlog.GA)
Affects Version/s: 3.0.0.Alpha3
(was: 7.0.1.CR1)
Write attribute on a new deployment scanner fails in batch
----------------------------------------------------------
Key: WFCORE-1635
URL:
https://issues.jboss.org/browse/WFCORE-1635
Project: WildFly Core
Issue Type: Bug
Components: Deployment Scanner
Affects Versions: 3.0.0.Alpha3
Reporter: Chao Wang
Assignee: Chao Wang
Priority: Minor
Creating a new deployment-scanner and altering it's attribute fails if done in single
batch. Running the commands without batch or running batch on CLI embed-server works
fine.
*reproduce*
{noformat}
batch
/subsystem=deployment-scanner/scanner=scan:add(path=log,
relative-to="jboss.server.base.dir", auto-deploy-exploded=false,
scan-enabled=false)
/subsystem=deployment-scanner/scanner=scan:write-attribute(name=scan-interval,
value=6000)
run-batch
{noformat}
fails with
{noformat}
08:09:19,076 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 4) WFLYCTL0013: Operation ("write-attribute")
failed - address: ([
("subsystem" => "deployment-scanner"),
("scanner" => "scan")
]): java.lang.IllegalStateException
at
org.jboss.as.server.deployment.scanner.DeploymentScannerService.getValue(DeploymentScannerService.java:234)
at
org.jboss.as.server.deployment.scanner.DeploymentScannerService.getValue(DeploymentScannerService.java:62)
at
org.jboss.msc.service.ServiceControllerImpl.getValue(ServiceControllerImpl.java:1158)
at
org.jboss.as.controller.OperationContextImpl$OperationContextServiceController.getValue(OperationContextImpl.java:2282)
at
org.jboss.as.server.deployment.scanner.AbstractWriteAttributeHandler.applyUpdateToRuntime(AbstractWriteAttributeHandler.java:58)
at
org.jboss.as.controller.AbstractWriteAttributeHandler$1.execute(AbstractWriteAttributeHandler.java:104)
at
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
at
org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
at
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
at
org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1344)
at
org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:392)
at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:217)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:208)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$300(ModelControllerClientOperationHandler.java:130)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:152)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:148)
at java.security.AccessController.doPrivileged(AccessController.java:686)
at javax.security.auth.Subject.doAs(Subject.java:569)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:92)
at
org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:148)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$ManagementRequestContextImpl$1.doExecute(AbstractMessageHandler.java:363)
at
org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:472)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
{noformat}
using the embed server works
{noformat}
embed-server
batch
/subsystem=deployment-scanner/scanner=scan:add(path=log,
relative-to="jboss.server.base.dir", auto-deploy-exploded=false,
scan-enabled=false)
/subsystem=deployment-scanner/scanner=scan:write-attribute(name=scan-interval,
value=6000)
run-batch
{noformat}
Setting only as minor as there is no real use case behind this (scan-interval can be set
while adding a new scanner) - run into it quite accidentally. No regression against
previous release.