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

Failures of undeploy of a partially failed deployment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0.Beta1
    • None
    • CLI, Management
    • None

    Description

      [domain@localhost:9990 /] undeploy 2e3b75f2-88ff-4eb9-a8b1-9107c452309e.ear --all-relevant-server-groups
      Undeploy failed: JBAS010839: Operation failed or was rolled back on all servers.
      

      There are several issues at play here:

      1. Insufficient information is displayed along with JBAS010839
      2. No actual failure logged either in DC or in individual host's logs
      3. Failure to find a deployment unit on a particular host should not result in a failure of a domain-wide undeploy in DeploymentUndeployHandler

      I'll start in a reverse order of causation:

      In DeploymentUndeployHandler.execute

          public void execute(OperationContext context, ModelNode operation) throws OperationFailedException {
              ModelNode model = context.readResourceForUpdate(PathAddress.EMPTY_ADDRESS).getModel();
      ...
      

      OperationContextImpl.readResourceForUpdate calls OperationContextImpl.requireChild:

          private static Resource requireChild(final Resource resource, final PathElement childPath, final PathAddress fullAddress) {
              if (resource.hasChild(childPath)) {
                  return resource.requireChild(childPath);
              } else {
                  PathAddress missing = PathAddress.EMPTY_ADDRESS;
                  for (PathElement search : fullAddress) {
                      missing = missing.append(search);
                      if (search.equals(childPath)) {
                          break;
                      }
                  }
                  throw ControllerMessages.MESSAGES.managementResourceNotFound(missing);
              }
          }
      

      The exception generated by throw ControllerMessages.MESSAGES.managementResourceNotFound(missing);:

      1. does not propagate from the host to DC and to CLI
      2. is not logged with any level (not even TRACE) either on host or DC
      3. should be handled within DeploymentUndeployHandler not to fail the undeploy operation in case of a partially failed deployment (e.g. EAR with unsatisfied CDI dependencies).

      Attachments

        Issue Links

          Activity

            People

              bstansbe@redhat.com Brian Stansberry
              arcivanov_jira Arcadiy Ivanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: