Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26940

No feedback why no installer was found for a given node

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins 1.580.1
    • Similar Issues:

      Description

      I noticed that when there is no installer available for a JDK, the JAVA_HOME environment variable will be empty in the environment of a build. This will happen for example when there is no installer configured for a JDK. In that case it's not hard to find the cause. But for the case I describe below it's much harder to find out why JAVA_HOME is empty.

      Therefore I think logging should be improved when a specific JDK is configured for that build and no installer is available for that JDK. Furthermore JAVA_HOME should be set to match the default JVM.

      Here are the steps to reproduce:

      • Configure two JDK's, named JDK1 and JDK2 (because if you have only one JDK you can't select one in a job)
      • Add an 'Extract .zip/.tar.gz' installer to JDK1 and set the label for this installer to 'jdk1', so it won't be available for installation on nodes to which this label is not assigned
      • Create a freestyle job and select JDK1 as JDK
      • Run the job and check that JAVA_HOME is empty

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            Reopened this, I created the PR referencing this issue.

            Show
            danielbeck Daniel Beck added a comment - Reopened this, I created the PR referencing this issue.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/tools/InstallerTranslator.java
            core/src/main/resources/hudson/tools/Messages.properties
            test/src/test/java/hudson/tools/InstallerTranslatorTest.java
            http://jenkins-ci.org/commit/jenkins/ae29e6b2463754778c3988e62292a07a846ffe57
            Log:
            JENKINS-26940 Print message when installer isn't applicable (#2598)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/tools/InstallerTranslator.java core/src/main/resources/hudson/tools/Messages.properties test/src/test/java/hudson/tools/InstallerTranslatorTest.java http://jenkins-ci.org/commit/jenkins/ae29e6b2463754778c3988e62292a07a846ffe57 Log: JENKINS-26940 Print message when installer isn't applicable (#2598) JENKINS-26940 Print message when installer isn't applicable JENKINS-26940 Only print when none found, add test
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            https://github.com/jenkinsci/jenkins/pull/2598 has been merged towards 2.28.
            Daniel Beck do you feel other parts of this PR apart of diagnostics really need to be fixed? I doubt

            Show
            oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/jenkins/pull/2598 has been merged towards 2.28. Daniel Beck do you feel other parts of this PR apart of diagnostics really need to be fixed? I doubt
            Hide
            danielbeck Daniel Beck added a comment -

            The main problem here is installers, and that got diagnostic messages, so considering this resolved.

            Show
            danielbeck Daniel Beck added a comment - The main problem here is installers, and that got diagnostic messages, so considering this resolved.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/tools/InstallerTranslator.java
            core/src/main/resources/hudson/tools/Messages.properties
            test/src/test/java/hudson/tools/InstallerTranslatorTest.java
            http://jenkins-ci.org/commit/jenkins/e85e3e2b907f894b536332d80b997711f73c4174
            Log:
            JENKINS-26940 Print message when installer isn't applicable (#2598)

            (cherry picked from commit ae29e6b2463754778c3988e62292a07a846ffe57)

            Compare: https://github.com/jenkinsci/jenkins/compare/6edd35d11b38...e85e3e2b907f

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/tools/InstallerTranslator.java core/src/main/resources/hudson/tools/Messages.properties test/src/test/java/hudson/tools/InstallerTranslatorTest.java http://jenkins-ci.org/commit/jenkins/e85e3e2b907f894b536332d80b997711f73c4174 Log: JENKINS-26940 Print message when installer isn't applicable (#2598) JENKINS-26940 Print message when installer isn't applicable JENKINS-26940 Only print when none found, add test (cherry picked from commit ae29e6b2463754778c3988e62292a07a846ffe57) Compare: https://github.com/jenkinsci/jenkins/compare/6edd35d11b38...e85e3e2b907f

              People

              • Assignee:
                danielbeck Daniel Beck
                Reporter:
                wgreven Wilco Greven
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: