glassfish
  1. glassfish
  2. GLASSFISH-8438

V3 Build produces incomplete zip (no domain dir in the final zip)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: V3
    • Fix Version/s: V3
    • Component/s: build_system
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      8,438

      Description

      I just encountered a severe issue with v3 build. I had left a GlassFish instance
      running while starting a fresh build. The build finished successfully, but
      glassfish.zip did not have domain1 dir in it. Scrolling the logs, I found the
      following message during nucleus distribution build:

      [INFO] ------------------------------------------------------------------------
      [INFO] Building Glassfish v3 Nucleus Distribution
      [INFO] task-segment: [install]
      [INFO] ------------------------------------------------------------------------
      ...
      create-domain:
      [echo] Directory to run command from:
      /space/ss141213/WS/gf/v3.trunk.new/distributions/nucleus/target/stage/glassfishv3/glassfish/bin
      [echo] Command to run:
      /space/ss141213/WS/gf/v3.trunk.new/distributions/nucleus/target/stage/glassfishv3/glassfish/bin/asadmin
      [exec] Port for domain1 (4848) is in use. Try a different port number.
      [exec] CLI130 Could not create domain, domain1
      [exec] Command create-domain failed.
      [exec] Result: 1

      Despite this error, the build continued. How bad?

      Looking at the build scripts, I see the following nucleus/build.xml:
      <target name="create-domain-on-unix" depends="init" if="unix">
      <ant antfile="../distributions.xml" target="create-domain">
      <property name="exec.dir"
      value="$

      {basedir}/target/stage/${install.dir.name}/glassfish/bin"/>
      <property name="exec.executable"
      value="${basedir}

      /target/stage/$

      {install.dir.name}

      /glassfish/bin/asadmin"/>
      </ant>
      </target>

      There is no way to know if the ant task finished successfully and that's the bug.

        Activity

        Hide
        janey added a comment -

        Since packager and distributions modules are now included in the v3/pom.xml default profile, the default
        domain is created during the build. When ant task fails to create the domain, the failure from ant does
        not return to the maven thus the build continuous.

        Workaround: make sure that default port, 4848 is available.

        Show
        janey added a comment - Since packager and distributions modules are now included in the v3/pom.xml default profile, the default domain is created during the build. When ant task fails to create the domain, the failure from ant does not return to the maven thus the build continuous. Workaround: make sure that default port, 4848 is available.
        Hide
        Snjezana Sevo-Zenzerovic added a comment -

        FWIW, this looks like asadmin regression to me - 'asadmin create-domain' command
        used in the build contains --checkports=false parameter, so it should not be
        checking for port availability and use default port numbers in the first place.
        I don't think it is particularly good idea to force developers to shutdown their
        domains while they do the build, any port conflict reporting should be deferred
        to domain startup.

        Appropriate reporting of domain creation failure for generic use case IMO
        deserves separate issue - we could set failonerror flag for asadmin exec task
        and this would stop the build on asadmin failure, but in that case we also need
        to accomodate incremental build use case where there is an existing domain in
        place and there were no changes in domain dependencies such as nucleus-base,
        etc. In those cases we have to detect the presence of default domain content and
        skip the 'asadmin create-domain' step.

        I'll assign this issue to me and use it as generic use case issue, but I'll also
        do some more digging and file separate admin issue for regression in port
        verification.

        Show
        Snjezana Sevo-Zenzerovic added a comment - FWIW, this looks like asadmin regression to me - 'asadmin create-domain' command used in the build contains --checkports=false parameter, so it should not be checking for port availability and use default port numbers in the first place. I don't think it is particularly good idea to force developers to shutdown their domains while they do the build, any port conflict reporting should be deferred to domain startup. Appropriate reporting of domain creation failure for generic use case IMO deserves separate issue - we could set failonerror flag for asadmin exec task and this would stop the build on asadmin failure, but in that case we also need to accomodate incremental build use case where there is an existing domain in place and there were no changes in domain dependencies such as nucleus-base, etc. In those cases we have to detect the presence of default domain content and skip the 'asadmin create-domain' step. I'll assign this issue to me and use it as generic use case issue, but I'll also do some more digging and file separate admin issue for regression in port verification.
        Hide
        Alexis MP added a comment -

        adding myself to CC list

        Show
        Alexis MP added a comment - adding myself to CC list
        Hide
        km added a comment -

        adding myself.

        Show
        km added a comment - adding myself.
        Hide
        Byron Nevins added a comment -

        .

        Show
        Byron Nevins added a comment - .
        Hide
        Byron Nevins added a comment -

        create-domain has a "new improved" way of checking ports. It was ignoring
        "--checkports=false" flag.

        All fixed now.

        Show
        Byron Nevins added a comment - create-domain has a "new improved" way of checking ports. It was ignoring "--checkports=false" flag. All fixed now.
        Hide
        Snjezana Sevo-Zenzerovic added a comment -

        FWIW, I filed separate issue to handle proper domain creation failure reporting
        and support incremental distributions build:

        https://glassfish.dev.java.net/issues/show_bug.cgi?id=8492

        Show
        Snjezana Sevo-Zenzerovic added a comment - FWIW, I filed separate issue to handle proper domain creation failure reporting and support incremental distributions build: https://glassfish.dev.java.net/issues/show_bug.cgi?id=8492
        Hide
        Byron Nevins added a comment -
            • Issue 8489 has been marked as a duplicate of this issue. ***
        Show
        Byron Nevins added a comment - Issue 8489 has been marked as a duplicate of this issue. ***

          People

          • Assignee:
            Byron Nevins
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: