Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1635

Write attribute on a new deployment scanner fails in batch

XMLWordPrintable

      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

      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
      

      fails with

      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)
      

      using the embed server works

      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
      

      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.

              chaowan@redhat.com Chao Wang
              chaowan@redhat.com Chao Wang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: