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

Attributes host-release and its alternative management-major-version shouldn't be optional(allowNull)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.Alpha3
    • 5.0.0.Alpha1
    • Management
    • None

      HostExcludeResourceDefinition attributes host-release and its alternative management-major-version shouldn't be optional (allowNull) as said:

      optional {@code true} if the attribute {@link AttributeDefinition#isAllowNull() allows undefined values} in the absence of {@link #setAlternatives(String...) alternatives}

      Although add operation fails, exception comes from server side add handler execution

      [domain@localhost:9990 /] /host-exclude=he:add()
      {
          "outcome" => "failed",
          "failure-description" => {"domain-failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.IllegalArgumentException"},
          "rolled-back" => true
      }
      

      Server side exception:

      [Host Controller] 15:22:07,089 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("add") failed - address: ([("host-exclude" => "he")]): java.lang.IllegalArgumentException
      [Host Controller] 	at org.jboss.dmr.ModelValue.asInt(ModelValue.java:61)
      [Host Controller] 	at org.jboss.dmr.ModelNode.asInt(ModelNode.java:288)
      [Host Controller] 	at org.jboss.as.domain.controller.resources.HostExcludeResourceDefinition.getVersionKey(HostExcludeResourceDefinition.java:198)
      [Host Controller] 	at org.jboss.as.domain.controller.resources.HostExcludeResourceDefinition.registerHostExcludes(HostExcludeResourceDefinition.java:160)
      [Host Controller] 	at org.jboss.as.domain.controller.resources.HostExcludeResourceDefinition.access$700(HostExcludeResourceDefinition.java:54)
      [Host Controller] 	at org.jboss.as.domain.controller.resources.HostExcludeResourceDefinition$AddHandler.performRuntime(HostExcludeResourceDefinition.java:225)
      [Host Controller] 	at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:151)
      [Host Controller] 	at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:982)
      [Host Controller] 	at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:726)
      [Host Controller] 	at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:450)
      [Host Controller] 	at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1408)
      [Host Controller] 	at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
      [Host Controller] 	at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
      [Host Controller] 	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:263)
      [Host Controller] 	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:229)
      [Host Controller] 	at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
      [Host Controller] 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
      [Host Controller] 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
      [Host Controller] 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
      [Host Controller] 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
      [Host Controller] 	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:287)
      [Host Controller] 	at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:244)
      [Host Controller] 	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
      [Host Controller] 	at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
      [Host Controller] 	at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
      [Host Controller] 	at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
      [Host Controller] 	at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
      [Host Controller] 	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      [Host Controller] 	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      [Host Controller] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      [Host Controller] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      [Host Controller] 	at java.lang.Thread.run(Thread.java:748)
      [Host Controller] 	at org.jboss.threads.JBossThread.run(JBossThread.java:485)
      

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

                Created:
                Updated:
                Resolved: