Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-1437

Cannot remove JGroups subsystem from managed domain via CLI

XMLWordPrintable

      Osamu Nagano reports:

      "Description of problem:
      In EAP 6.1 domain mode, try to create a new profile from scratch in CLI. You can add jgroups subsystem but you cannot remove it with an error message.
      In standalone mode and both modes of EAP 6.0.1, you can successfully remove it.

      Steps to Reproduce:
      1. Start EAP 6.1 in domain mode. The default domain.xml is sufficient.
      2. Connect to the DC by CLI.
      3. Execute the following commands in CLI.

      [domain@localhost:9999 /] /profile=test:add()
      [domain@localhost:9999 /] /profile=test/subsystem=jgroups:add(default-stack=udp)
      [domain@localhost:9999 /] /profile=test/subsystem=jgroups:remove()

      Actual results:
      {
      "outcome" => "failed",
      "failure-description" =>

      {"domain-failure-description" => "JBAS014807: Management resource '[(\"subsystem\" => \"jgroups\")]' not found"}

      ,
      "rolled-back" => true
      }

      Expected results:
      {
      "outcome" => "success",
      "result" => undefined,
      "server-groups" => undefined
      }
      "

      I see that the problem exists in WildFly as well.

      The problem is in JGroupsSubsystemRemove:

      ModelNode removeSubsystem = Util.createOperation(REMOVE, PathAddress.pathAddress(JGroupsExtension.SUBSYSTEM_PATH));
      context.addStep(removeSubsystem, new OriginalSubsystemRemoveHandler(), OperationContext.Stage.MODEL, true);

      That PathAddress.pathAddress(JGroupsExtension.SUBSYSTEM_PATH) is incorrect in a managed domain, as it doesn't include the profile element. It's correct in a standalone server.

      Easy fix.

              bstansbe@redhat.com Brian Stansberry
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: